vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   /me code Version 3 (https://vborg.vbsupport.ru/showthread.php?t=59698)

Edgewize 03-11-2004 10:06 AM

Great hack; I customized it pretty heavily to add support for private messages, message preview, and to respect bbcode-disabled flags. I also think that this will work no matter what font is currently in use, and it will never generate non-XHTML-compliant output (even when tags are badly overlapped).

[high]* Edgewize clicks install because without Erwin, I'd never have started!
[/high]


I put the following a file called hack_me.php:

(NOTE: had to mangle the color tags to get it to post right. replace Xcolor with color in six places!)

Code:

<?php
if (THIS_SCRIPT == 'newreply' && !isset($bbcode) && isset($pagetext))
        $pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$postinfo['username'].' $3', $pagetext);
elseif (THIS_SCRIPT == 'private' && !isset($bbcode) && isset($pagetext))
        $pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$pm['fromusername'].' $3', $pagetext);
elseif (isset($bbcode) && $dobbcode && is_array($GLOBALS['post']))
        $bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[Xcolor=#008811]$1* '.$GLOBALS['post']['username'].' $3[/Xcolor]', $bbcode);
elseif (isset($bbcode) && $dobbcode && $GLOBALS['previewpost'])
        $bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[Xcolor=#008811]$1* '.$GLOBALS['bbuserinfo']['username'].' $3[/Xcolor]', $bbcode);
elseif (isset($bbcode) && $dobbcode && isset($GLOBALS['fromuserinfo']))
        $bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[Xcolor=#008811]$1* '.$GLOBALS['fromuserinfo']['username'].' $3[/Xcolor]', $bbcode);
?>

Then added the line
Code:

@include('hack_me.php');
in the following places:

Code:

includes/functions_bbcodeparse.php  around line 323, immediately after:
        global $DB_site, $vboptions, $bbuserinfo, $templatecache, $smiliecache;
        global $html_allowed;

newreply.php  around line 96, immediately after
        $pagetext = trim(strip_quotes($pagetext));

private.php  around line 1156, immediately after
        $pagetext = trim($pagetext);


(Note: to change the color, change the three color tags in hack_me.php)

First post, baby! And hello Erwin, I totally forgot that you post here as well as at EV1servers :)

Boofo 03-11-2004 11:01 AM

I'm still have problems with the different fonts (as you can see in the thread link below). Any idaes how to fix this?

http://www.bearfacts2.com/forums/showthread.php?t=437

SaN-DeeP 03-11-2004 07:39 PM

Quote:

Originally Posted by DestinyIslands
[high]* DestinyIslands will click install as soon as he installs it! Should be tonight or tommorw!
[/high]

/you ... what does this do?

the you tag sounds more interesting though..

think of users using.
Example i post a message like:

[you] is a nice member

When rest of members of board read that message it. it appears to them as
[Member Reasing the post name] is a nice member

;)
what do u think ??

Boofo 03-11-2004 09:31 PM

Quote:

Originally Posted by san-deep
the you tag sounds more interesting though..

think of users using.
Example i post a message like:

[you] is a nice member

When rest of members of board read that message it. it appears to them as
[Member Reasing the post name] is a nice member

;)
what do u think ??

I'm putting the install file together for it now. I did this a while back for my site for vB3 but I needed to get the archive code set right so the [you] code wouldn't show up there. I have it up and working now at my site if you would like to check it out. ;) I need someone to make sure I got all the places it can show up at (in case I missed any).

ChuanSE 03-12-2004 05:44 AM

i didn't manage to get a answer for you boofo :/
I guess it doesn't work in my private forum...

But hey, you made some real cool mods on your board :D

Boofo 03-12-2004 06:47 AM

Quote:

Originally Posted by ChuanSE
i didn't manage to get a answer for you boofo :/
I guess it doesn't work in my private forum...

But hey, you made some real cool mods on your board :D

That's because on my site I don't use [you]. I use a different word so I don't get it overused and abused on the board too soon. ;)

Thank you for the kind words. Glad to have you aboard. ;)

BBQ 03-12-2004 01:14 PM

Installed on RC4, works like a charm

Well that is, it works fine in a new thread and new reply.
Works fine in quoting a post with a /me in it.

Doesn't work when you edit the orig /me post, you loose the username then. But you can always add /me befor eit again. Plus editting is not done often.

[high]* BBQ is happy but he already installed this on beta 7 and pressed install a few pages in this thread back :p[/high]

SaN-DeeP 03-12-2004 06:41 PM

Quote:

Originally Posted by Boofo
I'm putting the install file together for it now. I did this a while back for my site for vB3 but I needed to get the archive code set right so the [you] code wouldn't show up there. I have it up and working now at my site if you would like to check it out. ;) I need someone to make sure I got all the places it can show up at (in case I missed any).

can u please pm me the links to ur board ??
i had installed the YOU tag on ipb :)

i administrate my forums, and i know what are default places where that thing should be visible ;)

Sandy...

Boofo 03-12-2004 06:46 PM

It's in my profile, but here it is again. ;)

http://www.bearfacts2.com

ChuanSE 03-14-2004 06:33 AM

Quote:

Originally Posted by Boofo
That's because on my site I don't use [you]. I use a different word so I don't get it overused and abused on the board too soon. ;)

Thank you for the kind words. Glad to have you aboard. ;)

aha, what would be the secret word then? :p j/k

But hey, i'm glad to have guyz like you aboard :D
Keep up the good work ;)

Edgewize 03-15-2004 10:58 AM

FYI, PMs and editing work properly in my reorganized version of Erwin's most excellent hack.

Boofo 03-15-2004 03:57 PM

Same here. Thank you very much, sir. ;)

I still can't get the different fonts to work right though with or without your code. :(

Edgewize 03-15-2004 05:08 PM

Oh... for a while, I wasn't able to reproduce your problem Boofo, but now I think I got it!

I re-edited my post and changed some of the lines in hack_me.php, give that a shot...

Boofo 03-15-2004 05:55 PM

Thank you, sir, that made a big difference. ;)

There is still one small problem. The link below is how it looks now. The first post still has a problem if there is a line of text before it for some reason. Otherwise, it works great!

http://www.bearfacts2.com/forums/sho...=1296#post1296

Also, you need to add color to the second line in the hack_php.file for quoting the pms. If there is no color in there, the quoted pms don't show color (as you are replying to the message). ;)

Edgewize 03-15-2004 06:37 PM

I think that in your second line, the font is changing between the / and the "me". Not sure if I can really support that. Just don't do it! *grin*

As for the color, I actually like it better when the quoted lines don't have color, because in my postbit it looks confusing (at a glance, its hard to tell if the /me belongs to the quoted post or the reply). You can always change the preg_replace line to put the [color] back in, as you've done :D

Boofo 03-15-2004 06:42 PM

Is there a way to parse the line if it has the /me code in it anywhere? They had that for vb2 and it was great. ;)

Boofo 03-15-2004 06:45 PM

Quote:

Originally Posted by Edgewize
I think that in your second line, the font is changing between the / and the "me". Not sure if I can really support that. Just don't do it! *grin*

You were right. That's what it was doing. I fixed it and all is well now. Thank you again, sir. This is by far the greatest addition to this hack there ever has been. Excellent job! ;)

EDIT I did notice that when you go to edit the post, it parses the default font line but not the rest. Like this:

Quote:

Let's see if this works

/ me is testing with the Comic Sans Font

/ me is testing with the Centurt Gothic Font

* Boofo is testing the default font

/ me is testing with the Garamond Font (size 3)
Shouldn't it work the same way for all of them? (I had to add a space between the / and the me here to show you what it looks like in edit mode on my site or it would parse it here. It looks just like that but without the spaces I added here.)

Edgewize 03-16-2004 11:18 PM

Quote:

Originally Posted by Boofo
Shouldn't it work the same way for all of them? (I had to add a space between the / and the me here to show you what it looks like in edit mode on my site or it would parse it here. It looks just like that but without the spaces I added here.)

Yeah. This is a weird one, I can't reproduce it; working fine on my board. Maybe you left in one of the lines from the original hack by Erwin? As you said, there's no reason that it should detect it properly for display but not on the quote page. It's the same preg_match expression :/

Zachery 03-16-2004 11:54 PM

Any one figure out my problem?

Edgewize 03-17-2004 10:38 AM

Quote:

Originally Posted by Zachery
Any one figure out my problem?

You could have made it easier and linked to your last post, it was a bit tough to find :/ If the problem is still that the /me is lost on editing, try switching to my modified version of this hack instead:

https://vborg.vbsupport.ru/showthrea...334#post484334

msimplay 03-21-2004 05:34 PM

Quote:

Originally Posted by Edgewize
You could have made it easier and linked to your last post, it was a bit tough to find :/ If the problem is still that the /me is lost on editing, try switching to my modified version of this hack instead:

https://vborg.vbsupport.ru/showthrea...334#post484334

that works floorlessly

BarBeQue 03-23-2004 09:39 PM

Tested and works fine on vbb3 gold!

Small change though... in includes/functions_bbcodeparse.php instead of looking for this
PHP Code:

$bbcode str_replace(array('&gt;|||)''&lt;|||)''"|||)'), array('&gt;)''&lt;)','")'), $bbcode); 
    } 
// end smilies 

You need to look for this slightly different line:
PHP Code:

        $bbcode str_replace(array("&gt;\xE4)""&lt;\xE4)""&quot;\xE4)"), array('&gt;)''&lt;)','&quot;)'), $bbcode);
    } 
// end smilies 


8472 03-25-2004 10:15 AM

/me wonders if someone would be so kind to release this as a .htl file

Frugal 03-25-2004 10:50 AM

Quote:

Originally Posted by Edgewize
Great hack; I customized it pretty heavily to add support for private messages, message preview, and to respect bbcode-disabled flags. I also think that this will work no matter what font is currently in use, and it will never generate non-XHTML-compliant output (even when tags are badly overlapped).

[high]* Edgewize clicks install because without Erwin, I'd never have started!
[/high]


I put the following a file called hack_me.php:

:)

Ok let me get this straight, is this on top of erwins hack or instead of it?

Frugal

Boofo 03-25-2004 10:59 AM

Instead of. ;)

Frugal 03-25-2004 11:08 AM

Quote:

Originally Posted by Boofo
Instead of. ;)

Hmm, then I can't understand why it isn't working. Uploaded hack_me.php to root vbb folder, when that failed moved it to includes, when that failed checked the other files to make sure the @include('hack_me.php'); was in the right place.

[high]* Frugal is now stumped.[/high]

Frugal

Boofo 03-25-2004 11:13 AM

It works great for me, I'm not sure what could be happening on your site. Wish I could give you some sort of an answer. :(

Frugal 03-25-2004 11:16 AM

Where does the hack_me.php go? Is it the forum root, or the includes dir? I'm guessing the problem is in this file somewhere as the other 3 files each only need one minor edit which I have checked to be correct.

Frugal

Frugal 03-25-2004 11:39 AM

Hmm Erwins version works but I can't get the one by Edgwize to work for love nor money :(

Frugal

Boofo 03-25-2004 11:42 AM

The hack_me.php file does in the forum root. ;)

It's wierd that it doesn't work for you. I couldn't get Erwin's version to work right but the hack_me version fixed everything. ;)

Frugal 03-26-2004 11:01 AM

Problem solved and surprisingly simple. Changed first line of hack_me.php from

<?

to

<?php

Frugal

Boofo 03-26-2004 11:58 AM

Quote:

Originally Posted by Frugal
Problem solved and surprisingly simple. Changed first line of hack_me.php from

<?

to

<?php

Frugal

Congratulations! I'm glad you got it working for you! ;)

Stray 03-26-2004 11:08 PM

nevermind, seems to work in quick replies now...

lasto 03-26-2004 11:20 PM

/me clicks install

easiest hack ive ever doen and works fine as well

nice one erwin

GamerJunk.net 03-27-2004 03:22 AM

/me installs

Frugal 03-27-2004 09:23 AM

Quote:

Originally Posted by Boofo
Congratulations! I'm glad you got it working for you! ;)

Well good and bad, discovered a nasty bug with that version of the hack, several threads became unviewable, obviously something in them that the hack was trying to parse. I've had to remove this hack and go back to Erwins version.

Frugal

Boofo 03-27-2004 09:54 AM

Sounds to me like you have something else going on somewhere interfering with this hack then. I have never run into that anywhere on my forum. All threads view fine. There's really no way that it can cause any threads not to view. All he is parsing in the hack is the /me code. :surprised:

Frugal 03-27-2004 11:39 AM

Dunno, it's probably clashing with another hack, but either way it causes problems for me. With Erwins version all threads open fine, with Edgewizes about 4 threads showed as blank pages.

Frugal

Boofo 03-27-2004 12:00 PM

Is that what you were testing on my site? You said it didn't work. What did you try to do?

Frugal 03-27-2004 12:34 PM

Quote:

Originally Posted by Boofo
Is that what you were testing on my site? You said it didn't work. What did you try to do?

I tried to paste in one of the problem posts from my board but unfortunately it was too long for your forum.

This is one of the posts it didn't like

http://forums.frugalsworld.com/vB/showthread.php?t=25598

*you need to copy and paste the url into a browser and change vB to v b b (without the spaces)

Funny enough I think all of the problem posts had a url with /me in it somewhere in the post, coincidence?

Frugal


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.01482 seconds
  • Memory Usage 1,844KB
  • 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
  • (2)bbcode_php_printable
  • (15)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