Announcement

Collapse
No announcement yet.

Help coding with vB3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • xbleed
    replied
    Woops, for some very strange reason, that's where I thought I was. Sorry.

    Leave a comment:


  • Zachery
    replied
    For help with hacking or third party scripts please try asking for help at vBulletin.org

    Leave a comment:


  • xbleed
    started a topic Help coding with vB3

    Help coding with vB3

    I'm hoping someone can help me out. I'm new to this php stuff and I basically want to pull the 10 last updated articles in my article database up in the home page.

    In article.php I have managed to add this:

    Code:
    //START NEW ARTICLES
     $new = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "article ORDER BY dateline DESC LIMIT 10");
     $newcount = $DB_site->num_rows($new);
     
     		eval('$articlebits .= "' . fetch_template('article_newbit') . '";');
       
     		if ($newcount > 0)
     		{
     		    eval('$articlecontent .= "' . fetch_template('article_newlist') . '";');
     		}
     		else
     	   {	
     		   eval('$articlecontent .= "' . fetch_template('article_newlist_noresults') . '";');
     	   }
     //END NEW ARTICLES
    Now I've added the two new templates, but I don't think I have that code 100% correct. I also need help in putting it it on the index page. Can anyone here point me in the right direction? I've been stuck on this for a while.

    Thanks, and sorry for resorting to asking for help, I just can't figure it out.
Loading...
Working...
X