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)

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.


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