vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last post on forum home, working version (https://vborg.vbsupport.ru/showthread.php?t=28561)

N9ne 09-29-2002 07:31 PM

I don't have enough time to read through all 19 pages, maybe someone can tell me straight away...how can I make it so clicking the title takes you to the thread, and not the last post in that forum?

N9ne 09-29-2002 07:38 PM

N/M I found it ;)

ForYou 10-02-2002 07:37 AM

Hello ..
I'm use 2.2.8 and i have install the last title hack and evry thing is good without any problems .. and now i have problem with it

when i need to put reply on any topic in my forum the last title will not show on forum home but if i reply with subject and icon the icon will appear (show) on forum home without the title ..

please help me for that and sorry for my english ...

Regards

Kars10 10-11-2002 05:32 PM

This hack rules!!
Wonder? Bevor installation i´ve had 24 Querys on Forumhome now after the installation ive got 23...??
/me loves it and klicks install!

Mystic Gohan 10-12-2002 12:38 AM

can you show me how to do the little .............. thing so that it doesnt mess with my forum lenths and makes it not strech out

pgowder 10-16-2002 07:12 PM

I installed the hack on my forums running v2.2.8. Here is the error I get:

Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: SELECT * FROM thread WHERE forumid='33' AND lastposter='Smokin' Ace' AND lastpost='1034790242'
mysql error: You have an error in your SQL syntax near 'Ace' AND lastpost='1034790242'' at line 1

mysql error number: 1064

Date: Wednesday 16th of October 2002 04:26:52 PM
Script: http://www.powwows.com/gathering/gat...admin/misc.php
Referer: http://www.powwows.com/gathering/adm...action=chooser


I believe it might be having problems with a user that's username is Smokin' Ace because of the ' in the username. How can I fix that?

Thanks

N9ne 10-16-2002 07:13 PM

Maybe you can post in that forum, so your username is shown then try again...?

pgowder 10-16-2002 07:17 PM

But won't it give an error next time she posts?

N9ne 10-16-2002 07:26 PM

Was that error message created while hacking or does it come up when she posts?

pgowder 10-16-2002 07:29 PM

Sorry, I should have said that I get this error while running forum update.

Thanks

NTLDR 10-16-2002 07:30 PM

Change:

PHP Code:

$threadtitle=$DB_site->fetch_array($DB_site->query("SELECT * FROM thread WHERE forumid='$forumid' AND lastposter='$getchildforum[lastposter]' AND lastpost='$getchildforum[lastpost]'")); 

To:

PHP Code:

$threadtitle=$DB_site->fetch_array($DB_site->query("SELECT * FROM thread WHERE forumid='$forumid' AND lastposter='".addslashes(htmlspecialchars($getchildforum[lastposter]))."' AND lastpost='$getchildforum[lastpost]'")); 

That should fix the problem.

pgowder 10-16-2002 07:33 PM

Which file does that change go in?

NTLDR 10-16-2002 07:36 PM

admin/functions.php You need tyo replace whats in the text file with the change I made above so it should work.

pgowder 10-16-2002 07:36 PM

I found it, and that fixed it.

Thanks for the quick responses!!

NTLDR 10-16-2002 07:38 PM

No problem, happy to help :D

Erwin 10-19-2002 09:15 PM

Bug: If the parent forum is NOT private, but the child forum IS private, the last title appears to show up for members who have no access to the private child forum.

Is there a fix for this? Thanks in advance. :)

N9ne 10-24-2002 08:03 PM

@Erwin, I also noticed this problem + this one:

When a thread is the latest thread and its title is shown on forumhome, and I edit the thread's title, and go back to forumhome, it still shows the old thread title, and not the new one...my guess is maybe modifying editpost so when the thread title is changed, it changes it in the DB?

desi 11-09-2002 10:08 AM

i ave v-bulletin 2.2.8 running and i tried adding this hack but this is what i got ....

i went through the entire thread but no luck :(

Parse error: parse error, expecting `']'' in /home/123.com/httpdocs/forums/index.php(321) : eval()'d code on line 6

Parse error: parse error, expecting `']'' in /home/123.com/httpdocs/forums/index.php(321) : eval()'d code on line 6
===============================

line 321 is this
eval("\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");

According to instructions i am suppose to add this
<a
href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]">$forum[lastthread]</a> to the 'forumhome_lastpostby'


any suggestions ....

thankx for helping

N9ne 11-09-2002 11:10 PM

It is telling you to add that HTML into the TEMPLATE forumhome_lastpostby not in the code ;)

CtrlAltDel 11-25-2002 10:39 PM

I installed this hack and the thread names rarely update on the homepage at all. I have tried a few fixes in this thread but they dont seem to work, 2.2.8, etc. I'm going to look at the file tek posted, but atm its not working right.

CtrlAltDel 11-25-2002 10:48 PM

its the newreply code i think
as the newpost code works fine

CtrlAltDel 11-25-2002 11:09 PM

hmm seemed to have fixed it
musta missed a line :D

Sue 11-26-2002 12:28 AM

Code:

+-----------------------------------------------+
| File: FORUM/postings.php (1 change)          |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
  updateforumcount($threadinfo[forumid]);

  if ($visible) {
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
  updateforumcount($threadinfo[forumid]);

  $lastpost=$DB_site->query_first("SELECT * FROM forum WHERE forumid='$threadinfo[forumid]'");
  if($lastpost['lastpost']==$threadinfo['dateline']) {
    $DB_site->query("UPDATE forum SET lastthread='".addslashes(htmlspecialchars($title))."' WHERE forumid='$threadinfo[forumid]'");
  }

  if ($visible) {
+--------------------------------------------------------------------------+


I don't have the " if ($visible) {" anywhere underneath any of the "updateforumcount($threadinfo[forumid]);" in the file...

:(

M.C. 11-27-2002 10:05 PM

sorry, may be you already talk about, but... how to add lastthread icon for that hack on forumhome?

thanx

Mr. X 12-04-2002 01:57 AM

^check back a few pages.

I read quickly through each page, but didnt see what I was looking for, at least not quite.

I have a forum where almost every thread has a cuss word in the title. The forum can only be read and posted in for registered users, logged out/unreg users still see the forum in question listed on the index, but when they enter, they wont be able to see any threads.

This hack works great on 2.2.9, have it working on my test installation on my workstation, however I'd really like to know if its possible, to disable the last post for this one forum I have? I know I can change permissions to make it invisible to unregistered users, but I dont want to do that, since the forum still needs to appear in the index. Thanks!

N9ne 12-04-2002 03:23 PM

Has anyone figured out how to update the title on forumhome when the thread's title is edited?

N9ne 12-04-2002 03:25 PM

...Hmm...ok I just looked in the instructions once again and found this:

lastthread

That's the row that's created in a table in the DB....

My guess is...upon editing a thread, the change is entered somewhere, but the code isn't calling it?

M.C. 12-04-2002 09:01 PM

N9ne, use "Update Counters" in your AdminCP ;)

Mr. X, please, can you give me link to message, couse i have not time to search.... please! ;)

N9ne 12-05-2002 03:03 PM

M.C.: I could use update counters, but that would mean everytime someone edits a thread's title, I would have to update counters...not practical.

Highlander 12-07-2002 11:40 AM

hi there.. i just got a little error on my site: http://www.spieleplanet.org/forum

look on the main boards "Spieleplanet Communizty .. there it shows 2x times the last threads.. but only in this forums.. on all others its okay.. please give me an idea!?

thx

influence 12-29-2002 09:23 PM

Quote:

+-----------------------------------------------+
| File: FORUM/postings.php (1 change) |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
updateforumcount($threadinfo[forumid]);

if ($visible) {
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
updateforumcount($threadinfo[forumid]);

$lastpost=$DB_site->query_first("SELECT * FROM forum WHERE forumid='$threadinfo[forumid]'");
if($lastpost['lastpost']==$threadinfo['dateline']) {
$DB_site->query("UPDATE forum SET lastthread='".addslashes(htmlspecialchars($title)) ."' WHERE forumid='$threadinfo[forumid]'");
}

if ($visible) {
+--------------------------------------------------------------------------+


that dont show for me either on vb 2.2.6 for the postings.php file.

when i search for updateforumcount($threadinfo[forumid]); .. about 4 of them comes up without the invisible part.

any help?

Boofo 01-09-2003 07:58 PM

I just installed this on 2.2.9 but I got an error when I went to update the forum info. This is the error:

Quote:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT * FROM thread WHERE forumid='10' AND lastposter='Boofo's Babe' AND lastpost='1042060020'
mysql error: You have an error in your SQL syntax near 's Babe' AND lastpost='1042060020'' at line 1

mysql error number: 1064

Date: Thursday 09th of January 2003 09:51:30 PM
Script: http://www.bearfacts2.com/forum/forum/admin/misc.php
Referer: http://www.bearfacts2.com/forum/admin/misc.php
I changed the user name causing this to Boofos Babe without the apostrophe, but it still gives me the error. Can anyone please help me with this as my board is messed up now? :)

Boofo 01-10-2003 01:13 PM

Ok, I finally got the forum update counters to work by making the last post by someone other than the user with an apostrophe in the name. If they post any last posts in the future, then we are going to run into the problem again. I think it has something to do with adding htmlspecialchars or something like that to the last poster in the hack but I'm not sure where to add that to avoid the db error problem in the future. Can anyone lend a hand on that? Also, I get this error when I click on a last post link from a forum that has only 1 thread and 1 post in it.

Quote:

No thread specified. If you followed a valid link, please notify the webmaster
It seems if there is more than 1 post in 1 thread, then the link clicks through fine. Anyone have any ideas on how to fix this?

Boofo 01-10-2003 04:33 PM

Quote:

Originally posted by TECK
it's fixed now. make sure when you download the file, at the top it says version 1.1, not 1.0.
if it says 1.0, clear your browser temp files.

for those of you who want to have a link the the thread itself, instead of going to the last post do this:

open showthread.php and find:
Code:

if ($goto=="nextnewest") {
replace it with:
Code:

// goto newest thread
if ($goto=="newthread") {
  if (isset($forumid) and $forumid!=0) {
    $foruminfo=verifyid("forum",$forumid,1,1);
    $forumid=$foruminfo['forumid'];

    $forumslist = "";
    $getchildforums=$DB_site->query("SELECT forumid,parentlist FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',$forumid,')>0");
    while ($getchildforum=$DB_site->fetch_array($getchildforums)) {
      if ($getchildforum[forumid]==$forumid) {
        $parentlist=$getchildforum[parentlist];
      }
      $forumslist.=",$getchildforum[forumid]";
    }

    $thread=$DB_site->query_first("SELECT threadid FROM thread WHERE forumid IN (0$forumslist) AND visible=1 AND (sticky=1 OR sticky=0) AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]");
    exit;
  }
}

if ($goto=="nextnewest") {

your link to the latest thread will become:
Code:

<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]">$forum[lastthread]</a>
scott, let me know if you found the code acceptable on the .txt file. thanks you.

update: i'm gonna look also in postings.php file, it needs to be also modified. for example if you edit a thread title, it wont update the thread... i will look into it and post the mod here...

floren.

Floren, will the following code do the same thing or do I need to change it to your code above?

Code:

open showthread.php and above:

if ($goto=="nextnewest") {
  $thread = verifyid("thread",$threadid,1,1);


add:

// goto newest thread
if ($goto=="newthread") {
  if (isset($forumid) and $forumid!=0) {
    $foruminfo=verifyid("forum",$forumid,1,1);
    $forumid=$foruminfo['forumid'];
    $lastthread=$DB_site->fetch_array($DB_site->query("SELECT threadid FROM post WHERE username='".addslashes($foruminfo[lastposter])."' AND dateline='$foruminfo[lastpost]'"));
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
    exit;
  }
}


In the "forumhome_lastpostby" template:

change:

<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]">$forum[lastthread]</a>


to:

<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]" title="Go to first post">$forum[lastthread]</a>


Boofo 01-28-2003 03:19 AM

Is anyone still supporting this hack? I finally got it working ok, but I ran into a problem earlier tonight. I got the

Quote:

No thread specified. If you followed a valid link, please notify the webmaster
error again while clicking on the last title link on one of the forums on the forumhome. When I ran the update counters for the threads and then the forums, the link was clickable again. Does anyone have any idea what would cause this to happen? The thread in question did have some dashes in the title name, if that means anything.

Boofo 01-30-2003 08:24 PM

One last time, is anyone supporting this hack?

N9ne 02-06-2003 06:35 PM

I found a bug in this hack, say you disallow guests to view threads in a forum, the guest can still see the title on forumhome, what can I do to make it so they only see the last post they're supposed to see?

KevinM 02-11-2003 05:50 PM

I have installed this hack and it partly works. I have checked the installation and all seems to be as per instructions. I also have a gateway (usenet) hack installed which maybe causing a conflict.

My problem is:
The last post date / name etc are fine
The last post title is incorrect - it was correct the first time but won't update.
The link from the last post title works, and takes you to the last post.

Why won't the title update?

You can see the site at http://www.gardenbanter.co.uk

I hope one of you can help.

Ok - I think I've figured it out. As all my threads come from usenet, the gateway script imports them into the db. Therefore after each import, the 'update forums info' needs to be run. In my case this is 6 times every hour. I have written a cron job calling the misc.php file. It seems to be working, but don't know what it will mean to the server load.

webhost 02-17-2003 11:01 PM

have the same problem using 2.2.9 Hack was working then I installed this hack https://vborg.vbsupport.ru/showthrea...threadid=34361 now when someone registers it puts the info for that user in the post but does not update on forumhome page. I can go and run update counters in admin cp and it updates then. Any ideas.?

maxxxxxx 02-19-2003 10:47 AM

All works great but i want this last post on left side under the forums list like the picture...

http://www.phonecity.de/lastpost.gif


thx and cu
maxxxxxx


All times are GMT. The time now is 11:36 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.01594 seconds
  • Memory Usage 1,842KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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