This is a modification of this mod for vB3. This is the first time I've ever done this and all the necessary variables are correct, I just left what I didn't need alone. Soo, to all you real hackers, this will seem very infantile but it's a huge step for me
I kept looking for it and asking if someone could make it and nobody ever did so I did it myself I have mine attached to my welcome panel but that isn't necessary I explain how to have it separated in the instructions and how to have it like mine should you have that welcome panel mod
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Oh and btw don't need to do step 1 adding phpinclude_start
// begin last news event on forumhome
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$newsforumid = 4; // change to the id of your news forum
$result = mysql_query("SELECT threadid,title,postusername,postuserid,replycount
FROM thread
WHERE forumid=$newsforumid
AND visible=1
ORDER BY dateline DESC LIMIT 1");
if (!$result)
{
$lastnews = "Couldn't get last news event";
}
else
{
$s = mysql_fetch_row($result);
$threadid = $s[0];
$title = $s[1];
$postusername = $s[2];
$postuserid = $s[3];
$replycount = $s[4];
$shash = $session[sessionhash];
if ($replycount == 0)
{
$replycount = 'no replies';
}
else if ($replycount == 1)
{
$replycount = 'one reply';
}
else
{
$replycount = "$replycount replies";
}
$lastnews = "Latest news: <a href=\"showthread.php?s=$shash&threadid=$threadid\ ">$title</a> by <a href=\"member.php?s=$shash&action=getinfo&userid=$ postuserid\">$postusername</a> with $replycount.";
}
}
// end last news event on forumhome
Just do stage 2!!!
Will work fine, ive tweaked the text which is shown
Sure you need step one because thats what does all the querys etc, bleh
Nice little mod thank you i will be using, one question, why rub out all the parts on your screenshot to hide your forums name etc when theres a link in your profile to your site so people will still see it
HUH??? Step one on thefile is the phpinclude_start stuff, which is assigning the querys to the variables, Step 2 is the template which outputs everything and displays them.
I just looked in another template i have and it seems that the current template already has that peice of code in for some reason? i don't know why :S because i never entered it
Anyhow, glad you're liking it, I was doing cartwheels that I could actually contribute to all the great people that have helped me so much I'm glad it's working out for everyone
Hey Kru - sorry, I haven't worked on my boards in a while so I haven't checked this board. I'm sure you could tweak it to do that, though I haven't a need for it so I haven't done it I'm sorry I'm not more helpful!