![]() |
PHP Widget???
i have integrated a php widget for the vbgallery. i like to show the newest galeries. But it doesn`t work. Can everyone give me a help? This is the code ...
ob_start(); $username = ''; // the username for your db $password = ''; // the password for your db $host = 'localhost'; // in 90% of cases its localhost, if not you can check in your vbulletin config file. mysql_connect ($host, $username, $password) or die ("Keine Verbindung moeglich"); mysql_select_db("...") or die ("Die Datenbank existiert nicht."); $ergebnis = "SELECT catid, title FROM ppgal_categories ORDER BY catid DESC LIMIT 2"; while($row = mysql_fetch_object($ergebnis)) { $output_bits .= '<a href="http://........de/gallery/browseimages.php?c='.$row[catid].'">'.$row[title].'</a>'; } mysql_close; $output = $output_bits; ob_end_clean(); thx |
you're fetching it as object (and not as an array) so you have to use $row->title ;)
|
$output_bits .= '<a href="http://.....de/gallery/browseimages.php?c='.$row->catid.'">'.$row->title.'</a>';
it doesn`t work too :o( Nothing to see in the cms... |
remove ob_start();
|
i remove the ob_start(); nothing to see and then i remove the ob_end and see nothing too ...
|
|
All times are GMT. The time now is 01:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|