Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
script in sidepanel
Hi. I would like to add some script to the sidepanel.
Any suggestions on how i can do it. i've tried all the sidepanel extensions and nothing likes it.
Thanks
0
This discussion has been closed.
Comments
I'm now trying to get some code to work in sidepanel but casnnot fathom what is going wrong. The code between the
<?php /* Extension Name: Sidepanel Extension Url: http://lussumo.com/addons Description: Enables you to insert everything you want to appear in the sidepanel easily (based on Statcounter by JP Mitchell) Version: 1.0 Author: Thomas Schranz Author Url: http://suitcase.at */ if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ $content = <<< ENDCODE if (@include(getenv('DOCUMENT_ROOT').'/gbfserv/phpadsnew.inc.php')) { if (!isset($phpAds_context)) $phpAds_context = array(); $phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context); echo $phpAds_raw['html']; } ENDCODE; $Panel->AddString($content,150); } ?>
And here is the error message I'm getting when I activate the above:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/greenbui/public_html/newforum/extensions/Sidepanel-2006-07-24/default.php on line 17
This is the line that the error is refering to:
echo $phpAds_raw['html'];
Any advice greatly appreciated.
Regards Keith.
<<<ENDCODE
statement?All you need to do is to load $content with the array information. I think you don't need the ENDCODE.
if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ $content = if (@include(getenv('DOCUMENT_ROOT').'/gbfserv/phpadsnew.inc.php')) { if (!isset($phpAds_context)) $phpAds_context = array(); $phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context); echo $phpAds_raw['html']; } $Panel->AddString($content,150); } ?>
if(in_array($Context->SelfUrl, array("index.php", "categories.php", "discussions.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ function GetRSSstuff(&$Context) { if (@include(getenv('DOCUMENT_ROOT').'/gbfserv/phpadsnew.inc.php')) { if (!isset($phpAds_context)) $phpAds_context = array(); $phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context); return $phpAds_raw['html']; } } $Panel->AddString(GetRSSstuff($Context),150); }