|
You last visited: Today at 18:57
Advertisement
Facebook APP "Problemchen".
Discussion on Facebook APP "Problemchen". within the Web Development forum part of the Coders Den category.
07/20/2012, 20:55
|
#1
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
Facebook APP "Problemchen".
Hallo epvp,
Ich habe ein Problem mit meiner Facebook APP.
Ich möchte meine APP so gestalten das man als End ergebniss
Ein Bild + Text mit Hyperlink auf die Pinnwand gepostet bekommt.
Sprich:
Streich ging schief! Frau stribt...
So solte es dan aussehen.
Das mit dem Bild + Text geht schonmal aber den Hyperlink bekomme ich dort einfach nicht
mit rein.
Siehe hier das Skript;
PHP Code:
<?php /** ERROR REPORTING AUSSCHALTEN. */ error_reporting(0); session_start(); date_default_timezone_set('Europe/Berlin');
/** FACEBOOK */ $_CONFIG['Link'] = <a> href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113"target="_self" class="meinLink">Video abspielen.</a>'; $_CONFIG['redirektURL'] = 'https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?v=app_478915602136113';
$_CONFIG['appId'] = '478915602136113'; $_CONFIG['secret'] = 'd3eeaa9f06f3db08bc912bd80819094a';
$_CONFIG['message'] = 'Streich ging schief! Frau stribt.';$_CONFIG['Link']
$_CONFIG['backgroundBild'] = './hippi.png'; $_CONFIG['bildBreite'] = 810; /* Damit Font richtig Zentriert werden kann! */
/** SchriftfarbenPool nach RGB */ $black = array( 0, 0, 0); $white = array( 255, 255, 255);
$_CONFIG['texte'][0]['fontNamePfad'] = './bodoni-mt.ttf'; $_CONFIG['texte'][0]['fontNameSize'] = 12; $_CONFIG['texte'][0]['X'] = -1; /* -1 für CENTER! */ $_CONFIG['texte'][0]['Y'] = 91; $_CONFIG['texte'][0]['FARBE'] = $black; $_CONFIG['texte'][0]['BILD'] = 0; $_CONFIG['texte'][0]['TEXT'] = '%name%';
$_CONFIG['texte'][1]['fontNamePfad'] = './Chunkfive.otf'; $_CONFIG['texte'][1]['fontNameSize'] = 14; $_CONFIG['texte'][1]['X'] = -1; /* -1 für CENTER! */ $_CONFIG['texte'][1]['Y'] = 190; $_CONFIG['texte'][1]['FARBE'] = $black; $_CONFIG['texte'][1]['BILD'] = 0; $_CONFIG['texte'][1]['TEXT'] = '%randomname%';
/** TABELLE speziell für BILDER */
$_CONFIG['backgroundImages'] = array( './1.png', );
/** TABELLE #1 */
$_CONFIG['vornamen'] = array( ' ' );
/** TABELLE #2 */
$_CONFIG['nachnamen'] = array( ' ' );
?>
In der Zeile:
PHP Code:
$_CONFIG['message'] = 'Streich ging schief! Frau stribt.';$_CONFIG['Link']
Solte man dan den Hyperlink mit den Text "Video abspielen" finden.
Bleim klicken auf "Video abspielen" solte man dan hin gelangen.
PS: Der Helfer bekommt eine kleine belohnung...
Lg
#
|
|
|
07/22/2012, 12:22
|
#2
|
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,904
Received Thanks: 25,394
|
General Coding -> Web Development
#moved
|
|
|
07/22/2012, 19:37
|
#3
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
Quote:
Originally Posted by MrSm!th
#moved
|
Danke, & weiter.
|
|
|
07/24/2012, 18:21
|
#4
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
#
|
|
|
07/24/2012, 20:14
|
#5
|
elite*gold: 203
Join Date: Sep 2007
Posts: 732
Received Thanks: 190
|
PHP Code:
$_CONFIG['Link'] = '<a> href="https://www.facebook.com/pages/******-on-Swag/469658739729756?sk=app_478915602136113"target="_self" class="meinLink">Video abspielen.</a>'; $_CONFIG['redirektURL'] = 'https://www.facebook.com/pages/******-on-Swag/469658739729756?v=app_478915602136113';
Du hast ein ' vor dem <a> vergessen, daher hat er den String nicht gestartet...
Sollte dir eig. am Syntax-Highlighting auffallen..
|
|
|
07/24/2012, 20:40
|
#6
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
klappt nicht. -.-
|
|
|
07/24/2012, 21:52
|
#7
|
elite*gold: 203
Join Date: Sep 2007
Posts: 732
Received Thanks: 190
|
Hier ist auch ein Fehler
PHP Code:
$_CONFIG['message'] = 'Streich ging schief! Frau stribt.';$_CONFIG['Link']
Richtig:
PHP Code:
$_CONFIG['message'] = 'Streich ging schief! Frau stribt. '.$_CONFIG['Link'];
Evtl. auch versuchen statt einfachen Anführungszeichen für die Begrenzung, die doppelten zu verwenden
PHP Code:
$_CONFIG['Link'] = "<a> href='https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113' target='_self' class='meinLink'>Video abspielen.</a>";
|
|
|
07/24/2012, 23:08
|
#8
|
elite*gold: 0
Join Date: Jul 2011
Posts: 43
Received Thanks: 68
|
Lol, müsst ihr alles 1:1 kopieren? Die idee war von mir und geht ganz einfach, man muss nur kurz was umschreiben...
Hier originale Link:
|
|
|
07/24/2012, 23:26
|
#9
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
Ich will nicht die idee klauen, ich habe nur keine lust auf einen so großen Link...
ich habe die APP der Seite nur als beispiel genommen um es besser zu demonstrieren.
Was muss ich den umschreiben?
|
|
|
07/31/2012, 18:42
|
#10
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
#
|
|
|
07/31/2012, 18:47
|
#11
|
elite*gold: 0
Join Date: Sep 2005
Posts: 426
Received Thanks: 87
|
Normalerweise zeigt einem die IDE sowas schon mit dem Syntaxhighlighting an
PHP Code:
$_CONFIG['Link'] = <a> href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113"target="_self" class="meinLink">Video abspielen.</a>';
das ist kein gültiger Link weil das anker element geschlossen wird bevor ihm irgendwelche attribute zugewiesen werden.
also > entfernen
PHP Code:
$_CONFIG['Link'] = '<a href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113" target="_self" class="meinLink">Video abspielen.</a>';
----
Quote:
Originally Posted by Mikesch01
PHP Code:
$_CONFIG['Link'] = '<a> href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113"target="_self" class="meinLink">Video abspielen.</a>'; $_CONFIG['redirektURL'] = 'https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?v=app_478915602136113';
Du hast ein ' vor dem <a> vergessen, daher hat er den String nicht gestartet...
Sollte dir eig. am Syntax-Highlighting auffallen..
|
|
|
|
07/31/2012, 19:23
|
#12
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
Quote:
Originally Posted by kissein
Normalerweise zeigt einem die IDE sowas schon mit dem Syntaxhighlighting an
PHP Code:
$_CONFIG['Link'] = <a> href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113"target="_self" class="meinLink">Video abspielen.</a>';
das ist kein gültiger Link weil das anker element geschlossen wird bevor ihm irgendwelche attribute zugewiesen werden.
also > entfernen
PHP Code:
$_CONFIG['Link'] = '<a href="https://www.facebook.com/pages/Niggas-on-Swag/469658739729756?sk=app_478915602136113" target="_self" class="meinLink">Video abspielen.</a>';
----
|
Nunja, klappt immernoch nicht.
Hier, ich habe noch etwas gefunden;
PHP Code:
<?php include_once ('config.php'); include_once ('class/base.class.php'); include_once ('lib/smarty/Smarty.class.php'); include_once ('fb/facebook.php'); class main { var $smarty; var $content_file; function parsePageSignedRequest() { if (isset($_REQUEST['signed_request'])) { $encoded_sig = null; $payload = null; list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2); $sig = base64_decode(strtr($encoded_sig, '-_', '+/')); $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true)); return $data; } return false; } function initialisieren() { global $_CONFIG; if (isset($_GET['code'])){ echo "<script type='text/javascript'>top.location.href = '$_CONFIG[Link]';</script>"; exit; } if ($_GET['sessionclear']) { @unlink($_SESSION['okfile2']); $_SESSION['okfile2'] = ''; $_SESSION['hippiname'] = ''; $_SESSION['ok'] = ''; unset($_SESSION['okfile2']); unset($_SESSION['hippiname']); unset($_SESSION['ok']); } header('Content-Type: text/html; charset=utf-8'); $this->smarty = new Smarty(); $this->smarty->allow_php_templates= true; $this->smarty->caching = false; $_REQUEST['action']='fanunvalid'; $signed_request = $this->parsePageSignedRequest(); if( ($signed_request != false && $signed_request->page->liked) || $_GET['publish'] || $_GET['publishok'] || $_GET['reset']) { $_REQUEST['action'] = 'skript'; } $this->content_file = $_REQUEST['action']; } function getsmarty() { return $this->smarty; } function main() { global $user; $this->initialisieren(); $phpFile = 'site/site_'.$this->content_file.'.class.php'; if(is_file($phpFile)) { include_once ($phpFile); $classname = 'site_'.$this->content_file; $dynamicClass = new $classname($this); $contentVars = $dynamicClass->getTemplateVars(); } $this->smarty->assign('_GET', $_GET); $this->smarty->assign('_REQUEST', $_REQUEST); $this->smarty->assign('_POST', $_POST); $this->smarty->assign('_SESSION', $_SESSION); $this->smarty->assign('_T', $contentVars); if (is_file('templates/'.$this->content_file.'.tpl')) { $content = $this->smarty->fetch($this->content_file.'.tpl'); } $this->smarty->assign('content', $content); $this->smarty->display('index.tpl'); } } ?>
|
|
|
07/31/2012, 20:22
|
#13
|
elite*gold: 0
Join Date: Sep 2005
Posts: 426
Received Thanks: 87
|
smarty cms und register_globals, wie war nochmal die URL
|
|
|
07/31/2012, 20:32
|
#14
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
Die Url
PHP Code:
https://www.facebook.com/pages/******-on-Swag/469658739729756?sk=app_478915602136113
'
|
|
|
08/01/2012, 21:02
|
#15
|
elite*gold: 36
Join Date: Nov 2011
Posts: 2,966
Received Thanks: 279
|
#
|
|
|
All times are GMT +2. The time now is 18:57.
|
|