2009-01-22, 03:36 AM
2009-01-22, 03:39 AM
After you have
$vidload = $db->simple_select();
you need to do what I posted above.2009-01-22, 03:45 AM
So i did this :
(this is in functions.php)
header template has this :
Still nothing appearing.
$vidload = $db->simple_select(TABLE_PREFIX."tube_video", "id, title", array("order_by" => RAND(), "", "", "limit 1"));
while($vid = $db->fetch_array($vidload))
{
$vidlink['id'] = $vid['id'];
$vidlink['title'] = $vid['title'];
}
(this is in functions.php)
header template has this :
<b>Random Immortal Technique Video :</b> <a href="vgallery.php?&file=read&id={$vidlink['id']}#video_content">{$vidlink['title']}</a>
Still nothing appearing.
2009-01-22, 03:50 AM
I'm not too familiar with how MyBB does templates, but I know you need to do something with ereg() function. I'll let someone else assist you with this as I've gotten you this far.
2009-01-22, 03:50 AM
Okay, thanks for all the help so far.
2009-01-22, 03:51 AM
No problem, mate. I wish I could help you more.
2009-01-22, 04:01 AM
Ooops, I had it in the middle of another if statement, the error has now changed once i moved the code.
Also realised you dont need TABLE_PREFIX. in simple_select
^^
the new error is
Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/immortaltechnique.co.uk/httpdocs/inc/functions.php on line 1358
line is :
Also realised you dont need TABLE_PREFIX. in simple_select
$vidload = $db->simple_select("tube_video", "id, title", array("order_by" => RAND(), "", "", "limit 1"));
while($vid = $db->fetch_array($vidload))
{
$vidlink['id'] = $vid['id'];
$vidlink['title'] = $vid['title'];
}
^^
the new error is
Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/immortaltechnique.co.uk/httpdocs/inc/functions.php on line 1358
line is :
$vidload = $db->simple_select(TABLE_PREFIX."tube_video", "id, title", array("order_by" => "title", "", "", "limit 1"));
2009-01-22, 04:02 AM
Where did you move it to?
2009-01-22, 04:03 AM
Above the function is_moderator
2009-01-22, 04:05 AM
What file, though? You need to do it in a file besides function_*.php, or any file in inc.php. Try to keep it in the plugin file(if this is for a plugin)