vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Latest post id and thread id on index page (https://vborg.vbsupport.ru/showthread.php?t=40700)

freakyshiat 07-05-2002 08:19 PM

Quote:

Originally posted by Zzed
LOL @ g-kforce2k2 :D:D:D

And you spelled sessionhash as sessionhas. ;)

:p

I fixed the error but no go :p

g-force2k2 07-05-2002 08:23 PM

lol thanks Zzed :)

btw Fazle just makre sure you fixed the sessionhash in mine and also i'll test in a few for you ;)

g-force2k2

freakyshiat 07-05-2002 08:28 PM

Quote:

Originally posted by g-force2k2
lol thanks Zzed :)

btw Fazle just makre sure you fixed the sessionhash in mine and also i'll test in a few for you ;)

g-force2k2

yeah i fixed the sessionhash but no go :p

thanks for helping me...and if you do get it working, tell me how to do the postid also if u have time :)

thanks again

g-force2k2 07-05-2002 09:59 PM

1 Attachment(s)
Here's a screenshot of what i believe that you wanted as well as the coding :) Enjoy...

---------------------
open index.php
---------------------

find:

// get total posts

above it add:

PHP Code:

// +++++++ Last Post Thread ID [ Start ] +++++++
$getid=$DB_site->query("SELECT threadid FROM thread ORDER BY lastpost DESC LIMIT 1");
  while (
$threads mysql_fetch_array($getid)) {
    
$lastthread="<a href=\"showthread.php?s=$session[sessionhash]&threadid=$threads[threadid]\">$threads[threadid]</a>";
  }
$getpid=$DB_site->query("SELECT postid FROM post ORDER BY postid DESC LIMIT 1");
  while (
$postings mysql_fetch_array($getpid)) {
    
$lastpost="<a href=\"showthread.php?s=$session[sessionhash]&postid=$postings[postid]\">$postings[postid]</a>";
  }
// +++++++ Last Post Thread ID [ End ] +++++++ 

Then open up the forumhome template and place

PHP Code:

$lastpost&nbsp;&nbsp;$lastthread 

where ever you want you can customize from there im sure you can :)

g-force2k2

Chris M 07-05-2002 10:03 PM

Scrap that...Dont work:)

Satan

Chris M 07-05-2002 10:14 PM

There is an update, should you prefer to use templates...

Input this code instead of g-force's :

PHP Code:

// +++++++ Last Post Thread ID [ Start ] +++++++
$getid=$DB_site->query("SELECT threadid FROM thread ORDER BY lastpost DESC LIMIT 1");
  while (
$threads mysql_fetch_array($getid)) {
  eval(
"\$lastthread = \"".gettemplate("lastthread_id")."\";");
}
$getpid=$DB_site->query("SELECT postid FROM post ORDER BY postid DESC LIMIT 1");
  while (
$postings mysql_fetch_array($getpid)) {
  eval(
"\$lastpost = \"".gettemplate("lastpost_id")."\";");
  }
// +++++++ Last Post Thread ID [ End ] +++++++ 


Now make 2 templates, :
Code:

lastthread_id
<a href="showthread.php?s=$session[sessionhash]&threadid=$threads[threadid]">$threads[threadid]</a>

Code:

lastpost_id
<a href="showthread.php?s=$session[sessionhash]&postid=$postings[postid]">$postings[postid]</a>

Now just put $lastthread and $lastpost in the forumhome template...

Satan

g-force2k2 07-05-2002 10:16 PM

lol thanks hellsatan :) i like using both but i think that eval() uses queries so i thought i'd just give it to himi in that form... but one thing yours is definately easier to customize ;)

g-force2k2

Chris M 07-05-2002 10:19 PM

1 Attachment(s)
Yeh...

I changed it anyway, to give the last post...

Satan

g-force2k2 07-05-2002 10:24 PM

yeah but he doesn't want the name he just said he wanted the id number :P at least thats what he said... just the last threadid and postid ;\ dunno :p

g-force2k2

Chris M 07-05-2002 10:29 PM

I just added Most viewed thread too:D

I like those kinda thingys:)

I wonder if you can put variables in your Signature?:confused:

Satan


All times are GMT. The time now is 06:18 AM.

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.01223 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete