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)

Scott MacVicar 03-13-2002 03:52 PM

hmm this one shouldn't muck it up as it relies on the updateforumcount function, so if you move or delete threads it gets the last thread and updates its value, its the main editing in /admin/functions.php which allows this to do so.
And one query per page view it alot and puts alot of extra server load.

bigmo 03-13-2002 07:50 PM

@PPN

I installed the hack as you described in the txt-file. The problem now is that I have an Admin&MOD-Forum eg. and i dont want the normal user to see the last title in these forum.

How can I do this?

THX for help

Erwin 03-13-2002 08:43 PM

Make that forum private. :)

Scott MacVicar 03-13-2002 09:06 PM

in your vBulletin Options select hide private forums.

bigmo 03-14-2002 06:05 AM

the problem is that useres who are not registred can see the forums but can not access those. When I turn on the "hide private forum" option then those useres can´t see any forum, and that´s bad.

The optimal solution for me would be the following:

All forums are visible, but the lasttitle is only displayed at forums the user can access and view. Forums the user dont have the premission to access (eg Admin-Fourm) are visible but the user dont see the lasttitle...

Is it possible to configure it so...???

THX
BigMo

Scott MacVicar 03-14-2002 07:55 AM

The code i adjusted sorted this cause it checks if the user has permission to view the forum and if they don't have it then it is hidden. Though this could be changed to check if they are allowed to view other threads or any other sort of permission for a forum. Will show the changes when i get home.

bigmo 03-14-2002 04:00 PM

Oh THX that would be fine...

BigMo

psychopathic 03-16-2002 05:51 PM

umm.. i installed this hack and now my post and thread counts are acting screwy. When i reply to a thread, the thread count goes to 0 or something along that line.

http://planetplastica.com/forums/index.php - see for yourself.

psychopathic 03-17-2002 03:07 AM

the support on this forum is simply stunning.

Scott MacVicar 03-17-2002 08:52 AM

NO need to bump the topic after a couple of hourse, some of us actually do things outside of vBulletin. Try updating forum info within the Update Counters part of the admin panel.

If this doesn't work then you have made an error while applying it to /admin/functions.php

psychopathic 03-17-2002 12:31 PM

i just figured that i'd get SOMETHING after 10 hours of waiting, but alas, i got nothing.

Thanks for the response PPN. Right now my vB is offline, but the ftp seems to still work.. strange, anyway, i had previously updated everything in attempt to fix it, and just now i re-modified functions.php and i'll let you know how it turns out when my site comes back online. thanks.

Tim Wheatley 03-18-2002 07:51 AM

Quote:

Originally posted by PPN
PHP Code:

          if (strlen($forum['lasttitle']) > 30) {
            
$forum['lasttitle'] = substr($forum['lasttitle'], 028);
            
$forum['lasttitle'] .= '..';
          } 

above that add the following
PHP Code:

$forum['lasttitle']=unhtmlspecialchars($forum['lasttitle']); 

if the length is over 30, remove everything after 28 characters and add two dots to the end.

Hope this helps, instruction file now updated.

Doesn't seem to work for Opera... Any ideas? :)

Tim Wheatley 03-18-2002 07:51 AM

Quote:

Originally posted by PPN
sorry about this i forgot to unhtmlspecialchars the title.


within index.php and forumdisplay.php look for the follow lines which you added.

PHP Code:

          if (strlen($forum['lasttitle']) > 30) {
            
$forum['lasttitle'] = substr($forum['lasttitle'], 028);
            
$forum['lasttitle'] .= '..';
          } 

above that add the following
PHP Code:

$forum['lasttitle']=unhtmlspecialchars($forum['lasttitle']); 

this should solve the problem with the characters not being converted.

Also the decision on length is made by the top code a quick explanation is, if the length is over 30, remove everything after 28 characters and add two dots to the end.

Hope this helps, instruction file now updated.

This does not seem to work for Opera - any ideas? :)

(The text limiting I mean - Opera users get a big long line of text...)

bigmo 03-18-2002 08:34 AM

Quote:

Originally posted by PPN
Though this could be changed to check if they are allowed to view other threads or any other sort of permission for a forum. Will show the changes when i get home.
@PPN
Have you forgotten me????

Please post the changes here...thats would be fine

THX
BigMo

Scott MacVicar 03-18-2002 08:35 PM

you can change

PHP Code:

$trueperm['canview'] = $forumperms['canview']; 

change the $forumperms['canview']; to whatever sort of permission you want.

such as
canview, canpostnew, canviewothers, canreplyothers, canreplyown

bigmo 03-19-2002 05:42 AM

OK THX...

My last question:

in which file at which position I must add/change the
Quote:

PHP:

$trueperm['canview'] = $forumperms['canview'];
???

Wayne2k1.com 03-20-2002 10:30 AM

It doesn't work 4 me.

:(

The hack works perfectly, but it shows last post for private forums, too...and that's baaaad.

bigmo 03-20-2002 11:44 AM

Yes I tested it vesterday (I changed the index.php und the forumdisplay.php) and it dont work for me too. The lastpost is still displayed at forums the user dont have the right to access...

Some other solutions ???

THX

Harvey 03-20-2002 02:46 PM

ok, here is an better but still untested!!! version.

It looks up, if a registered user can view a forum.
if Yes: put the title into the forum and the patents.
if No: put "(private message)" into the forum and the patents.

This design is because IMHO it is impossible to look up if the title is from a private subforum without doing a query.

First apply the changes from PPN
then my changes
then post dummy threads in the private forums.

Sorry for not testing, I currently have no testforum.

Wayne2k1.com 03-27-2002 09:41 AM

Doesn't work.

Code:

Invalid SQL: max(canview) as cveiw ,count(canview) as cnt from forumpermission where usergroupid=2 and forumid=5
mysql error: You have an error in your SQL syntax near 'max(canview) as cveiw ,count(canview) as cnt from forumpermission where usergrou' at line 1

That's the error.

Harvey 03-27-2002 09:50 AM

ups - forgotten "select "

Thank you

Wayne2k1.com 03-27-2002 10:08 AM

I guessed that...but I see you just noticed by yourself :)

It works...but it still gives an error in "Update Counters" --> "Forum Info"

Code:

SELECT max(canview) as cveiw ,count(canview) as cnt from forumpermission where usergroupid=2 and forumid=
mysql error: You have an error in your SQL syntax near '' at line 1

I think it's because from misc.php it doesn't have the

Code:

.$getchildforum[forumid]
variable.

Harvey 03-27-2002 02:46 PM

ok, I dont understand the reason for it (I don't think it's from misc.php). I have to create a test system, but this week I have no time.

Scott MacVicar 03-27-2002 03:37 PM

Harvey you decide if it should set the thread title if they can view it, what if they can't view the forum, why would they be posting in it :D

This is done in vBulletin 3 anyway, why can't you all just hide private forums within the general settings part of the admin panel.

Harvey 03-27-2002 05:56 PM

PPN, the actual problem is, if you have a privat subforum inside a nonprivate mainforum, everybody can see the the title in the mainforum, if the latest thread is in the private forum. No matter if you hide the private forum or not. You can see it, because it's the same with last time and last poster.

Sorry that my solution does not work yet, I tried it in theorie because I have currently not the time to test it. Perhaps with the hope, that I find a Betatester ;) My boss wants that I install your hack, and we can live with the decision if a new post belongs to a thread a registered user may see or not.

I hope you can understand me, I can't translate your first sentence because of my terrible english. Perhaps I can learn by posting in your forum.

PS: Great hack.

JTMON 04-06-2002 10:04 PM

Parse error: parse error in /usr/local/plesk/apache/vhosts/whatthefrag.com/httpdocs/forums/admin/functions.php on line 1892

Fatal error: Call to undefined function: makelogincode() in /usr/local/plesk/apache/vhosts/whatthefrag.com/httpdocs/forums/global.php on line 337

I'm running 2.2.5. This happens when I upload functions with the changes

infamous one 04-06-2002 11:44 PM

ALTER TABLE `forum` ADD `lasttitle` VARCHAR(100) NOT NULL AFTER `lastposter`

How would I go about removing this from my table?

Harvey 04-07-2002 09:44 AM

alter table forum drop column lasttitle

kms 04-11-2002 03:35 AM

hi anybody tested this on v2.25 ?

TIA :)

Wayne2k1.com 04-11-2002 06:48 AM

Quote:

Originally posted by kms
hi anybody tested this on v2.25 ?

TIA :)

Yep.

It works perfectly. (even the Omero sub-hack...look at it if you need to hide thread titles from private forums).

:laugh:

yasunari 04-14-2002 06:10 AM

I have it work on my board too (vbb 2.2.5) :squareeyed:

http://www.kelvinlo.net/vbb/

But I found that after I deleted or moved the post, I will saw the Last Post field will turn into Never...
It is normal or anyway can fix it?

yasunari 04-14-2002 06:54 AM

After i do forum update counter..

https://vborg.vbsupport.ru/

.I need to wait new members post/reply topic to get that field back.. anyway I can fix it?

Scott MacVicar 04-14-2002 09:52 AM

Ok i'll load this onto my test board just now, this is probably due to the editing done in functions.php

SoliduS_cF 04-19-2002 05:43 PM

Just installed it on 2.2.5 and receiving this parse error when creating a new thread:

Quote:

Parse error: parse error in /homepages/4/d26384347/htdocs/forums/newthread.php on line 252

zachb 04-23-2002 01:01 AM

<a href="http://www.sfpunk.com/forum/forumdisplay.php?forumid=2" target="_blank">http://www.sfpunk.com/forum/forumdisplay.php?forumid=2</a>

I get a parse error when going to a forum. I have rehacked forumdisplay 3 times to make sure it wasn't me and it still does not work. :ermm:

Wayne2k1.com 04-23-2002 05:45 AM

Strange thing...works fine x me in 2.2.5 too...

zachb 04-25-2002 01:41 AM

bump.

Mystics 04-25-2002 01:03 PM

@zachb
Why don't you post line 355-364, so we can see what's wrong with it....

Or send me your forumdisplay.php so I can check it.

Mystics

kms 04-25-2002 11:41 PM

Quote:

Originally posted by JTMON
Parse error: parse error in /usr/local/plesk/apache/vhosts/whatthefrag.com/httpdocs/forums/admin/functions.php on line 1892[/i]
i got the same with v2.2.5 but line 1893, got an extra } in there some how??, deleted one then ok

Quote:

Originally posted by JTMON
Fatal error: Call to undefined function: makelogincode() in /usr/local/plesk/apache/vhosts/whatthefrag.com/httpdocs/forums/global.php on line 337[/i][/b]
do your template & update counters thing :)

kms 04-26-2002 12:03 AM

aagghh, just noticed the forum post counters are all wrong on the front page, most show 0 posts etc. How do i fix this ?

TIA


All times are GMT. The time now is 06:37 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.01602 seconds
  • Memory Usage 1,834KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (8)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