vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   [you] hack (https://vborg.vbsupport.ru/showthread.php?t=60633)

Boofo 01-24-2004 11:10 PM

I can't find any of the code you said to search for in the functions.php.

EDIT: I found the code in functions_newpost.php. It seems to work except for the thread title in the message and the Subject of the message. Can those be fixed?

fly 01-25-2004 10:40 AM

Quote:

Originally Posted by NTLDR
It should replace it on any page, anywhere as long as the page goes through process_replacement_vars(), which all the main vB (forum) pages that output something do.

@flypaper, I'm a bit confused as to how you'd like this to work.

Lemme do an example and tell me if this can be done w/ vb3...

(original post with [you] hack): flypaper is cool.

(post quoted for reply w/ current hack): flypaper is cool.

(post quoted for reply w/ vb2 hack): [you] is cool.

Personally, I think it works better if the [you] code shows up in the quoted post. Hopefully, that makes sense now. Either way, I really appreciate the help.

Boofo 01-25-2004 10:50 AM

Quote:

Originally Posted by flypaper
Lemme do an example and tell me if this can be done w/ vb3...

(original post with [you] hack): flypaper is cool.

(post quoted for reply w/ current hack): flypaper is cool.

(post quoted for reply w/ vb2 hack): [you] is cool.

Personally, I think it works better if the [you] code shows up in the quoted post. Hopefully, that makes sense now. Either way, I really appreciate the help.

That would be ok if it only showed up as [you] for the Admins and Mods. Otherwise, once everyone on the forum sees what the code is to do it, then you have everyone doing it and it gets old really quick. It kills it basically. On my site, once I get the thread title and subject of the email notifications taken care of, I am going to change the word for the hack to something no one will figure out so it won't get abused on the site. ;)

NTLDR 01-25-2004 04:30 PM

@Boofo, sorry I meant functions_newpost.php ;)

For the [you] part I think he means [you] appears and isn't the next to get the username.

To fix thread titles, find again in functions_newpost.php:

PHP Code:

$threadinfo['title'] = unhtmlspecialchars($threadinfo['title']); 

Add after:
PHP Code:

$temptitle =  $threadinfo['title']; 

Find: (you added this code from the above instructions)

PHP Code:

$pagetext preg_replace('/{bbusername}/i'$touser['username'], $pagetext); 

Add after:

PHP Code:

$threadinfo['title'] = preg_replace('/{bbusername}/i'$touser['username'], $threadinfo['title']); 

Find (again you added this from the above posts instructions):

PHP Code:

$pagetext $temptext

Add after:

PHP Code:

$threadinfo['title'] = $temptitle 

To get [you] working as I think you want it too, try this it should work:

in newreply.php find:

PHP Code:

$pagetext htmlspecialchars_uni($postinfo['pagetext']); 

Add before:

PHP Code:

$pagetext =  preg_replace('/{bbusername}/i''\[you\]'$pagetext); 


Boofo 01-25-2004 07:01 PM

This:

PHP Code:

$threadinfo['title'] = $temptitle 

is supposed to have a semi-colon after it, right? ;)

Also, I put this:

PHP Code:

$temptitle $threadinfo['title']; 

AFTER the 2nd instance of this:

PHP Code:

$threadinfo['title'] = unhtmlspecialchars($threadinfo['title']); 

since it shows in 2 places in the file. Is it in the right place now?

NTLDR 01-25-2004 09:03 PM

Yes and yes ;)

Boofo 01-26-2004 12:12 AM

Thank you and thank you, sir. ;)

fly 01-26-2004 12:27 PM

Quote:

Originally Posted by Boofo
That would be ok if it only showed up as [you] for the Admins and Mods. Otherwise, once everyone on the forum sees what the code is to do it, then you have everyone doing it and it gets old really quick. It kills it basically. On my site, once I get the thread title and subject of the email notifications taken care of, I am going to change the word for the hack to something no one will figure out so it won't get abused on the site. ;)

LOL

I enjoy watching my users abuse the n00bs. That's fun to me.

Boofo 01-26-2004 08:58 PM

Quote:

Originally Posted by flypaper
LOL

I enjoy watching my users abuse the n00bs. That's fun to me.

Did the [you] code NTLDR post for you work like you wanted it to?

Boofo 01-27-2004 12:15 AM

NTLDR, one last area. Can we get this to work for the forum names in the archive display?


All times are GMT. The time now is 10:39 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.01118 seconds
  • Memory Usage 1,757KB
  • 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
  • (11)bbcode_php_printable
  • (4)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
  • (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