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)

floleb7 11-06-2001 02:43 AM

the title of the last post works but now time and date are not showing

Amasov 11-06-2001 03:33 PM

Here I got another problem:

Some lastpost-thread-descriptions won't be shown.

I used the utility "update counters", but it doesn't works.

What can I do?

Here is a sample:

http://www.d-c-f.de/images/Pictures/lastpostby.jpg

dxb 11-07-2001 03:13 AM

i just cleared my cache and downloaded the file and named it with a different name and still the file is not updated it's still says 2.0.1

Scott MacVicar 11-07-2001 03:11 PM

I looked at your forums Amasov and all looks ok now? did it just sort itself?

dxb i can assure you its the new version i've tried it on multiple computers and Firefly to, pm me your email and i'll email you the file then.

Scott

Amasov 11-07-2001 03:35 PM

Quote:

Originally posted by PPN
I looked at your forums Amasov and all looks ok now? did it just sort itself?
Scott

Heyho, Scott :)

I just sorted it myself while I was posting in the latest thread and deleted that post. Anyhow, if there was a new post in that described forums, the thread-description was shown. Therefore I made that database-update "by hand".

By now it works perfectly.

Thanks overall. :) :)

Regards,
Chris.

The Realist 11-08-2001 03:38 PM

Installed as per instructions and got the following error:

Parse error: parse error in /home/sites/home/web/forum/admin/functions.php on line 2254

Warning: Cannot add header information - headers already sent by (output started at /home/sites/home/web/forum/admin/functions.php:2254) in /home/sites/home/web/forum/admin/functions.php on line 1524

Fatal error: Call to undefined function: makelogincode() in /home/sites/home/web/forum/global.php on line 332


Any help?

:(

jamie 11-11-2001 11:05 AM

yey thanks! :D

i made my own version...but i never could get the right code in functions.php to make it work there:o

one suggestion could you add the last ico too, i already have this included in my version...i just can't code the correct stuff for functions.php to make it work there..ie when updating forums info or after a post is deleted :o

The Realist 11-11-2001 01:04 PM

Working now but Instructions a little bit confusing.

Were it says:

change to

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
}
}

This is not needed at all for 2.2.0 and users of 2.2.0 in fact need:

FOR 2.2.x USE THE FOLLOWING
-----------------------------------
look for
$lastpostquery=",lastpost='$lastpost',lastposter=' ".addslashes($lastposter)."';

change it to

$lastpostquery=",lastpost='$lastpost',lastposter=' ".addslashes($lastposter)."', lasttitle='".addslashes($lasttitle)."'";
save the file and upload then continue hack as normal

Can the very first bit " if ($lastposts['lastpost']) { " be deleted and replaced with FOR 2.0.x USE THE FOLLOWING Info.

:)

Scott MacVicar 11-11-2001 02:04 PM

The
PHP Code:

  if ($lastposts['lastpost']) {
    if (
$lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
      
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
                        
$lastpost=$lastposts['lastpost'];
                        
$lastposter=$lastposts['lastposter'];
                        
$lasttitle=$lastposts['title'];
                }
  } 

part is needed to give $lasttitle some value.

The last bit depends on which version as of 2.2.x they introduced $lastpostquery cause it wasn't needed some times..

The Realist 11-11-2001 03:08 PM

I could not find the below txt in my version 2.2.0 /admin/functions.php .......

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
}
}

So I left it out?

:(

Scott MacVicar 11-11-2001 03:18 PM

look for

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}
}

change to

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
}
}

your looking for the above one if you still can't find it your looking for

$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];

this in specific

The Realist 11-11-2001 04:01 PM

I cannot find the above, the nearest I can find is the below:

$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
if ($lastposts['lastpost']>$lastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}

:(

Scott MacVicar 11-11-2001 06:19 PM

ok change the following
PHP Code:

if ($lastposts['lastpost']>$lastpost) { 
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'"); 
$lastpost=$lastposts['lastpost']; 
$lastposter=$lastposts['lastposter']; 


to

PHP Code:

if ($lastposts['lastpost']>$lastpost) { 
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'"); 
$lastpost=$lastposts['lastpost']; 
$lastposter=$lastposts['lastposter']; 
$lasttitle=$lastposts['title']; 


I'll update the documentation with this then

The Realist 11-11-2001 06:53 PM

Its still has not updated the posts that have already been made. Its working if a member posts a current message but it does not update at all with any old posts.

I have change what you stated above and still no joy?

:)

LuBi 11-12-2001 01:12 AM

This hack didn't work for me on 2.2 I get the following error.

Parse error: parse error in /www/htdocs/forums/newthread.php on line 375

It's the ?> at the end of the document. I use EditPlus 2 to edit my files, why is it doing this?

dxb 11-12-2001 05:54 AM

also this may couse a problem

PHP Code:

  $DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthreads',lastpost='$lastpost',lastposter='".addslashes(htmlspecialchars($lastposter))."' WHERE forumid='$forumid'"); 

the new function file has the query changed to this

PHP Code:

    $DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthreads$lastpostquery WHERE forumid='$forumid'"); 

you can see the $lastpostquery is added to the query

Scott MacVicar 11-12-2001 06:20 AM

dxb >
i took that into account and its mentioned within the readme for how to do it to 2.2.x and 2.0.x because of the difference.

Lubi >
does EditPlus have syntax highlighting for PHP? if so then it should show where it went wrong, if not PHPed from http://soysal.com does and is useful for spotting errors.
I honestly don't know what would cause an error like that, you were only updating 3 lines within newreply.php

LuBi 11-12-2001 06:25 AM

Well I dunno either I do have the sytax colors but the code isn't wrong I think the software must be doing something when I save the file. I've never had this problem with Textpad but I like Editplus 2 way better... I dunno but I can't install any hacks until I get this squared away :eek:

LuBi 11-14-2001 03:49 AM

How can I make the title of the post/thread a link to the post..? Basically like below... Icon and all...

http://www.suprascene.com/temp/likethis.gif

Ubb style.. Can someone maybe write the template because i don't have the slightest... :confused: thanks ;)

I had it like this on 2.0.3 but I dunno what to do...

mojotim 11-14-2001 09:46 AM

Hi, great hack.

This typo gave me some problems:
within it you may add $form['lasttitle'] to show

Duh, I should have checked that!

Scott MacVicar 11-14-2001 03:00 PM

em my bad

:D

LuBi 11-15-2001 05:49 AM

Well I did the layout myself, but how do I get the code for the icon with the last post? What's the code for the icon?

SharkY-GA 11-15-2001 06:01 AM

Yeah it would rock if you added the post icon too

h4p3 11-15-2001 08:31 AM

PPN, this version works really fine on my testboard, some extreme testing, then i will do it on my main forum :)

Javier97Z28 11-15-2001 02:44 PM

This works great!! Thanks! (first post :) )

Scott MacVicar 11-15-2001 03:17 PM

Ok, i'll look into doing the post icon as well, I hope i can do it by just adding to the existing query :)

LuBi 11-15-2001 03:18 PM

Quote:

Originally posted by PPN
Ok, i'll look into doing the post icon as well, I hope i can do it by just adding to the existing query :)
Thanks!

LuBi 11-15-2001 10:46 PM

Tried to remove this hack, I uninstalled this hack form all my files backed out changed everything back from what the text told me to change it to. Anyhow so now with my fuctions.php I get this error:

Parse error: parse error in /www/htdocs/forums/admin/functions.php on line 1793

Fatal error: Call to undefined function: makelogincode() in /www/htdocs/forums/global.php on line 332

The code on the lines around it are as follow.

PHP Code:

1789    if ($lastpost!=$currentlastpost) {
        
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."';

    } else {
        
$lastpostquery="";
    }

    
$DB_site->query("UPDATE forum SET
                replycount
='$numberposts',threadcount='$numberthreads'
1798        $lastpostquery WHERE forumid='$forumid'"); 

$lastpostquery=""; seems to be the problem, what do I do?

SharkY-GA 11-15-2001 11:51 PM

Didnt you backup functions.php?

LuBi 11-16-2001 12:05 AM

Quote:

Originally posted by SharkY-GA
Didnt you backup functions.php?
Well yes but I installed other hacks after, it should be as simple as un-doing everything to install. But for some reason this hack isn't.... I dunno what the problem is.

LuBi 11-16-2001 06:17 AM

Well no one has been able to figure out why I get an error removing this hack. So I've decided to keep it, and wait for the icon addon. So I'll KIT waiting for that one, hurry PPN it's a killer.

Scott MacVicar 11-16-2001 06:25 AM

PHP Code:

$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'; 

your missing a " at the end should be

PHP Code:

$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'"


inetd 11-20-2001 09:05 PM

Please, inform the complete working code for vb2.2.1 version.

Scott MacVicar 11-21-2001 07:07 PM

It will work on vb 2.2.1 there will be no changes as 2.2.1 was just a bug fix and involves no changes to any of the functions which this edits.

Scott

inetd 11-24-2001 09:56 AM

The last version of the code without bugs is necessary for me. Which works with version 2.2.1. Where it to take?

Syphin 11-24-2001 10:12 AM

This does work perfectly fine on vb 2.2.1.. Ive been using it sense it was released...

-Syphin

inetd 11-24-2001 10:31 AM

I understand! The version free from bugs is simply necessary for me!

Alex 11-25-2001 09:55 AM

does this hack exclude private forums to show last title?

CHeeKY 11-25-2001 11:45 AM

Question how would this work if you are using access masks ?

Scott MacVicar 11-25-2001 12:10 PM

The makeforum function already takes into account access masks when showing the last post time and last post user this is simply an addition with last post title so if they don't have permission to view others then they shouldn't see time, user or title.

Scott


All times are GMT. The time now is 04:19 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.01651 seconds
  • Memory Usage 1,846KB
  • 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
  • (8)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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