vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Latest News on FORUMHOME (https://vborg.vbsupport.ru/showthread.php?t=89213)

imported_Ashkarita 05-24-2004 10:00 PM

Latest News on FORUMHOME
 
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 :)

imported_Kalipo 05-29-2004 09:55 AM

Edit the mod description you say VB2 when its VB3

Installed :)

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 :)

MindTrix 05-29-2004 11:16 AM

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 :p

imported_Kalipo 05-29-2004 11:34 AM

Actually if you look at the template mentioned in step one you will see that the script is already there to run the script and queries..

Whats the point in loopin the same querie?

See mine, Stage ones missed out..

www.frozentoast.co.uk/index.php

MindTrix 05-29-2004 11:44 AM

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.

imported_Kalipo 05-29-2004 11:47 AM

Bleh,

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 :(

Sorry for the confusion :S

imported_Ashkarita 05-31-2004 03:58 AM

<--is totally confused.

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 :)

Kru 10-15-2004 08:23 AM

can it just show the latest news of one forum or can I change it to $newsforumid = 1,2,3,4,5,6; so it shows the news from my other forums, too?

imported_Ashkarita 12-28-2004 02:20 AM

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!

Edison Chen 12-28-2004 04:31 PM

Worked like a charm. ;) Thanks Ash.

Bino 11-23-2005 05:31 PM

FIXED!


All times are GMT. The time now is 11:51 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
  • Page Generation 0.01041 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete