• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] get page list on footer

Started by sabor,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

saborTopic starter

hello

can i get page list on my footer?
If i try copy page list code from sidebar to footer i see error:

"Fatal error: Call to a member function get_result() on a non-object in [...] on line 1450

This is code:

$pagesx = $db->get_results("select title,pid,pic from ".DB_PREFIX."pages WHERE menu = '1' ORDER BY title ASC ".this_limit()."");
 /* The pages lists */
 if($pagesx) {
echo '<div class="box"> 
<div class="box-head">
<h4 class="box-heading">'._lang('Information').'</h4>
</div>
	<div class="box-body list">	
	<ul>';
	foreach ($pagesx as $px) {
echo '<li><img src="'.thumb_fix($px->pic, true, 23, 23).'"><a href="'.page_url($px->pid, $px->title).'" title="'._html($px->title).'"> '._cut(_html($px->title),19).'</a></li>';

	
	}

  echo '  </ul>   
    </div>
    </div>';
}
  •  

Marius P.

Hi! I assume you need to define $db as global on the top of the function.


function footer_add(){
global $db, $cachedb;
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)