Log in

View Full Version : [uShop] BBcode and Smilies in Custom Usertitle


dstruct2k
04-25-2004, 10:00 PM
Version 2 ;)
WHAT THIS HACK DOES:
Allows your members to buy the ability to use bbcode and smilies in their custom user title. Requires uShop.


PLEASE NOTE THAT THIS DOES NOT WORK WITH CACHED POSTS TURNED ON
IF ANYONE KNOWS HOW TO MAKE CACHED POSTS AND THIS HACK WORK TOGETHER, PLEASE LET ME KNOW SO I CAN RELEASE A VERSION 3

Instructions:
Moved to instructions.txt

NOTE:
If you are upgrading from version 1, you have already made the first edit (showthread.php) and run the query.

This version adds support to 5 other files.

:D

NuclioN
04-26-2004, 08:59 AM
Warning: main(uttstore/action.): failed to open stream: No such file or directory

and:

Fatal error: main(): Failed opening required 'uttstore/action.' (include_path='.:/usr/local/lib/php')

dstruct2k
04-26-2004, 12:20 PM
Warning: main(uttstore/action.): failed to open stream: No such file or directory

and:

Fatal error: main(): Failed opening required 'uttstore/action.' (include_path='.:/usr/local/lib/php')
When you added the new action, you didn't point it to action.changetitle_bbcode.php , instructions fixed.

NuclioN
04-26-2004, 12:59 PM
hm...yes it works but....the usertitle is replacing topic and reply's (???????)

My usertitle is 'matrixsurfer' and when i make a reply somewhere the whole reply is replaced with 'matrixsurfer'

msimplay
04-26-2004, 01:04 PM
YESSSSS i was waiting for this :D

wheres the install button :ermm:

and this hack needs to show the bbcode in usertitle in the profile
and forumdisplay
and now i'm guessing anywhere thats not the showthread

dstruct2k
04-26-2004, 04:53 PM
YESSSSS i was waiting for this :D

wheres the install button :ermm:

and this hack needs to show the bbcode in usertitle in the profile
and forumdisplay
and now i'm guessing anywhere thats not the showthread
Yeah, noticed that when looking at a PM I sent myself to store information in. :(


I'll post a version 2 later today.

JaNa
04-26-2004, 05:00 PM
I find this a useful item! But i'll wait for V2 since the current version has some bugs. :)

If only more items were made :(

* JaNa tries to click install

dstruct2k
04-26-2004, 05:03 PM
Thanks for clickin---- WAIT! Where's the install button!? Someone missed the Add-On Releases forum when they added the install button hack. :eek:

JaNa
04-26-2004, 05:07 PM
:rolleyes: Yeeah...I wonder if they noticed yet.

Anywayss...do you think you'll make more Store Items :nervous:

msimplay
04-26-2004, 05:10 PM
Yeah, noticed that when looking at a PM I sent myself to store information in. :(


I'll post a version 2 later today.
please do give update instructions :)

JaNa
04-26-2004, 06:30 PM
It's working great! Thanks.

Just one question: How do you change the length of text you can put in the Custom Title :nervous:

Giveit2u43
04-26-2004, 10:09 PM
hm...yes it works but....the usertitle is replacing topic and reply's (???????)

My usertitle is 'matrixsurfer' and when i make a reply somewhere the whole reply is replaced with 'matrixsurfer'
Do you have cached posts switched on? if so that`s the problem. as the parse_bbcode tag takes the parsed bbcode and uses it as the cached posttext..

dstruct2k
04-26-2004, 10:14 PM
It's working great! Thanks.

Just one question: How do you change the length of text you can put in the Custom Title :nervous:
vBulletin Options -> User Profile Options -> User Title Maximum Characters (default 25)

Zachery
04-26-2004, 11:00 PM
psst release it at geeky designs too ;)

dstruct2k
04-26-2004, 11:49 PM
<font size="4">VERSION 2 RELEASED!</font>

First post updated.

msimplay
04-27-2004, 03:34 PM
i need something that stops user from using bbcode in user title when using the standard change user title
in the shop

and something that changes bbcode user titles for other users
and stops them when using the standard one

these are suggestions just to round the hack off

also the bbcode does not parse in the ustore history

JaNa
04-27-2004, 05:52 PM
VERSION 2 RELEASED!

First post updated.

* JaNa Thumbs Up :up:

PranK
04-28-2004, 11:15 AM
How would I do this so that only BB codes will work, not the smilies?

Christian

dstruct2k
04-29-2004, 02:25 PM
How would I do this so that only BB codes will work, not the smilies?

Christian
I'm honestly not sure, as I just tap into the "bbcode_parse()" function, which by default includes smilies.

msimplay
04-29-2004, 02:57 PM
I'm honestly not sure, as I just tap into the "bbcode_parse()" function, which by default includes smilies.
i solved my previos problem with my earlier request
it seems that only admins may bypass the custom bbcode in user titles using the normal custom user title store item because they have html enabled for user titles good job am the only admin

ps could u make the same hack to include changing other users names aswell
please

to the store history

and if possible to the v3 stats page :$

dstruct2k
04-30-2004, 07:11 PM
i solved my previos problem with my earlier request
it seems that only admins may bypass the custom bbcode in user titles using the normal custom user title store item because they have html enabled for user titles good job am the only admin

ps could u make the same hack to include changing other users names aswell
please

to the store history

and if possible to the v3 stats page :$
I personally would rather have the history unparsed, so that you can see exactly what code the user used. I could code an option into the php though, version 3 soon I guess. :rolleyes:

As for that "stats" page, it's part of the v3arcade... I really don't want to code hacks for hacks that integrate with other hacks, if you know what I mean. (Otherwise you'd be asking for code for every hack that shows the usertitle. ;)) I'll post a quick fix in a sec though, as I too have the arcade installed, and I modded it about 10 minutes ago. :)

dstruct2k
04-30-2004, 07:21 PM
Arcade integration
(Editing arcade.php)

Find:$navbits[""] = "Arcade Statistics";

Add under: {
require_once('./includes/functions_bbcodeparse.php');
$user['usertitle'] = parse_bbcode($user['usertitle']);
}

Find:// if this is the user's first visit to the arcade

Add above: if ($bbuserinfo['titleparse'])
{
require_once('./includes/functions_bbcodeparse.php');
$bbuserinfo['usertitle'] = parse_bbcode($bbuserinfo['usertitle']);
}

msimplay
04-30-2004, 09:39 PM
I personally would rather have the history unparsed, so that you can see exactly what code the user used. I could code an option into the php though, version 3 soon I guess. :rolleyes:

As for that "stats" page, it's part of the v3arcade... I really don't want to code hacks for hacks that integrate with other hacks, if you know what I mean. (Otherwise you'd be asking for code for every hack that shows the usertitle. ;)) I'll post a quick fix in a sec though, as I too have the arcade installed, and I modded it about 10 minutes ago. :) yeh i was actually hoping to post in this forum for every hack that i may encounter in the future :o

ps thank you very much for the arcade intergration :D

msimplay
05-06-2004, 12:06 PM
Do you have cached posts switched on? if so that`s the problem. as the parse_bbcode tag takes the parsed bbcode and uses it as the cached posttext..
that is very weird actually i don't have that problem with cached posts turned on

weaver
05-08-2004, 02:01 PM
/me installs

weaver
05-09-2004, 02:38 AM
Do you have cached posts switched on? if so that`s the problem. as the parse_bbcode tag takes the parsed bbcode and uses it as the cached posttext..

How do you turn cached posts off?

msimplay
05-09-2004, 08:39 PM
um i need this modification for private messages now
:o

to snobbymom its under *Server Settings and Optimization Options* in admin cp options
and then set *Cached Posts Lifespan* to 0 days

Zachery
05-16-2004, 08:58 PM
It doesnt work at all with post chacing turned on? or it just doesnt update the old posts?

If it just doesnt update the old posts, then its a matter of just clearing the post chache and renalbing it.

dstruct2k
05-20-2004, 01:45 AM
Short instructions for profile.php because I'm busy right now:

Find a line with [musername]
add this a few lines above... {
require_once('./includes/functions_bbcodeparse.php');
$user['usertitle'] = parse_bbcode($user['usertitle']);
}

I'll post full instructions later, right now I'm coding vbEvents. :)

Zachery
05-20-2004, 03:41 AM
<poke> anwser me :P

msimplay
05-20-2004, 04:35 PM
Short instructions for profile.php because I'm busy right now:

Find a line with [musername]
add this a few lines above... {
require_once('./includes/functions_bbcodeparse.php');
$user['usertitle'] = parse_bbcode($user['usertitle']);
}

I'll post full instructions later, right now I'm coding vbEvents. :)
i'm using vb3.00
i can't find [musername] in profile.php

please release the instructions to add this hack to the private messages as my pms look weird

dstruct2k
05-24-2004, 04:37 AM
Well, I assumed it would be like the other pages. I guess it's not.

Give me a minute to find what needs changing.

dstruct2k
05-24-2004, 04:38 AM
<poke> anwser me :P
Sorry. :p

I never used post caching, so if I turned it on, I wouldn't find out anyway. :p

the Sandman
05-29-2004, 10:21 PM
I'm getting: Warning: main(uttstore/action.changetitle_bbcode.php): failed to open stream: No such file or directory in /home/painfor/public_html/forums/ushop.php on line 247

Fatal error: main(): Failed opening required 'uttstore/action.changetitle_bbcode.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/painfor/public_html/forums/ushop.php on line 247
Where did I mess up? :(

the Sandman
05-29-2004, 10:31 PM
OK - found it. I had to rename action[1].changetitle_bbcode.php to action.changetitle_bbcode.php. I'm not sure why it downloads like that though...

dstruct2k
05-31-2004, 04:02 PM
It doesn't in IE6...

Wait, yes it does... wierd...

dstruct2k
05-31-2004, 04:12 PM
i'm using vb3.00
i can't find [musername] in profile.php

please release the instructions to add this hack to the private messages as my pms look weirdI must've been asleep when I coded that.


You're wanting to edit PRIVATE.php, not profile...

Find: // parse the message
$pm['message'] = parse_pm_bbcode($pm['message'], $pm['allowsmilie']);

After add: if ($pm['titleparse'])
{
require_once('./includes/functions_bbcodeparse.php');
$pm['usertitle'] = parse_bbcode($pm['usertitle']);
}

msimplay
05-31-2004, 05:14 PM
I must've been asleep when I coded that.


You're wanting to edit PRIVATE.php, not profile...

Find: // parse the message
$pm['message'] = parse_pm_bbcode($pm['message'], $pm['allowsmilie']);

After add: if ($bbuserinfo['titleparse'])
{
require_once('./includes/functions_bbcodeparse.php');
$bbuserinfo['usertitle'] = parse_bbcode($bbuserinfo['usertitle']);
}
don't know if the attachment hack is affecting it but that doesnt work for me :(

dstruct2k
06-02-2004, 04:16 AM
Oh... my... god...

I need caffene. Badly.

I've edited my last post. :)

msimplay
06-02-2004, 03:30 PM
Oh... my... god...

I need caffene. Badly.

I've edited my last post. :)
thank you very much been waiting for it quite a while now but am really happy its done :D

msimplay
06-03-2004, 06:45 AM
another request for the bbcode in user titles
for the arcade screen for vs games :o

dstruct2k
06-04-2004, 02:46 PM
** starts crying **

In arcade.php find: $activitycount = $DB_site->query("SELECT COUNT(valid=1) AS played,userid FROM " . TABLE_PREFIX . "gamesessions GROUP BY userid");
Add before: if (($bbuserinfo['titleparse']) || ($user['titleparse']))
{
require_once('./includes/functions_bbcodeparse.php');
if ($bbuserinfo['titleparse'])
{
$bbuserinfo['usertitle'] = parse_bbcode($bbuserinfo['usertitle']);
}
if ($user['titleparse'])
{
$user['usertitle'] = parse_bbcode($user['usertitle']);
}
}


Untested, should work.

the Sandman
06-04-2004, 03:17 PM
Untested, should work.Tested... works. :D

msimplay
06-04-2004, 03:33 PM
** starts crying **


hehe am sorry but thank you very much i really appreciate it :D

68 Z-28
06-06-2004, 05:21 PM
I haven't looked at the instructions yet, so maybe I'm getting a head of myself in asking, but is there a way that this can be limited to specific usergroups? When we were running vb2.x I had it installed so that mods and admins would stand out and people knew who they were. I'd like to do that again.

Link14716
07-06-2004, 12:53 PM
This is now a part of uCash & uShop 0.95, only not. It allows BBCode and Smilies, needs no file edits, works with post caching, etc, works everywhere custom titles are shown, and doesn't need it's own action file - it just uses the standard Change Custom Title and Change Other User's Custom Title action files, controlled by an action specific variable. ;)

the Sandman
07-06-2004, 12:57 PM
This is now a part of uCash & uShop 0.95, only not. It allows BBCode and Smilies, needs no file edits, works with post caching, etc, works everywhere custom titles are shown, and doesn't need it's own action file - it just uses the standard Change Custom Title and Change Other User's Custom Title action files, controlled by an action specific variable. ;)Is there any problem upgrading to 0.95 if this hack is already in place?

Link14716
07-06-2004, 01:03 PM
No, but the action file from this hack will not work, and of course those who already bought BBCode titles will have the BBCode visable unless you keep the file edits from this hack.

the Sandman
07-06-2004, 01:25 PM
If we choose to remove this hack what query or queries are needed to reverse the query run during installation: ALTER TABLE `user` ADD `titleparse` SMALLINT( 6 ) DEFAULT '0' NOT NULL

the Sandman
07-07-2004, 05:23 PM
Anyone? :ermm:

Reeve of shinra
07-07-2004, 10:23 PM
Sandman: use this


ALTER TABLE `user`
DROP `titleparse`;


Alternately, go into phpmyadmin, go to the user table, check off the field 'titleparse' and click on the little garbage can icon at the bottom. (be sure NOT to hit drop at the top)

the Sandman
07-07-2004, 11:18 PM
Thanks man - that's what I was looking for!

EVJ7665
08-02-2004, 03:39 AM
I'd like to see a version of this hack that isn't in ushop. We used to have bbcode allowed in titles on our vb2 trying to get it working again on vb3.

msimplay
08-02-2004, 07:52 AM
This is now a part of uCash & uShop 0.95, only not. It allows BBCode and Smilies, needs no file edits, works with post caching, etc, works everywhere custom titles are shown, and doesn't need it's own action file - it just uses the standard Change Custom Title and Change Other User's Custom Title action files, controlled by an action specific variable. ;)
i upgraded to version 0.95 and now the custom user titles don't parse the bbcode what did i do wrong

i also ran the query

Sandman: use this


ALTER TABLE `user`
DROP `titleparse`;


Alternately, go into phpmyadmin, go to the user table, check off the field 'titleparse' and click on the little garbage can icon at the bottom. (be sure NOT to hit drop at the top)

shadesvn
08-12-2004, 01:14 PM
Hi, Im new to this mod, i need a Fresh installation so pls show me how to install this mod !

THanks mates !

jsnakej13
08-13-2004, 10:57 PM
This mod is now included in UShop. So Shadesvn you wasted time uploading this.

Tigga
10-07-2004, 04:39 PM
IF ANYONE KNOWS HOW TO MAKE CACHED POSTS AND THIS HACK WORK TOGETHER, PLEASE LET ME KNOW SO I CAN RELEASE A VERSION 3

$parsed_postcache['skip'] = true;
$post['usertitle'] = parse_bbcode2($post['usertitle'], 0, 0, 0, 1);
$parsed_postcache['skip'] = false;


(You can also enable/disable smilies, images, HTML, and etc with the parse_bbcode2() function instead of the parse_bbcode() function. ;))

Zachery
10-07-2004, 04:49 PM
$parsed_postcache['skip'] = true;
$post['usertitle'] = parse_bbcode2($post['usertitle'], 0, 0, 0, 1);
$parsed_postcache['skip'] = false;


(You can also enable/disable smilies, images, HTML, and etc with the parse_bbcode2() function instead of the parse_bbcode() function. ;))
Its a default feature in .95 now ;)

Tigga
10-07-2004, 04:57 PM
Yup, noticed that... This method is parsing the title after it's inserted into the database, while uShop is parsing the title before it's inserted into the database, which could create a problem if you still wanted to allow some users to use HTML. I was working on this for a client and noticed the post caching problem, came here to search real quick and see if anyone had posted about it (and found this post obviously), and decided to post the fix after I figured it out incase it would help anyone else. ;)

Wifey
01-27-2005, 12:38 AM
I just wanted to tell you dstruct2k that you're awesome! Thanks for such wonderful support - my questions were answered before I even finished reading the thread.

Two thumbs way up!

SeNdEr2005
02-08-2005, 04:28 PM
is there a way to add bbcode to username?

Wordplay
02-13-2005, 12:50 PM
i installed the latest version of ucash yesterday, but it bbcodes and smilies dont work in the user titles. so i found this hack, and installed it. but this hack doesn't quite work, when you click on the action it gives you the confirm button but no fields to enter anything in. i just read the last 2 pages here.

so i guess my problem is something with the ucash settings, or maybe i missed something when doing the hack. anybody know what the problem could be?

msimplay
02-13-2005, 01:05 PM
i installed the latest version of ucash yesterday,butit bbcodes and smilies dont work in the user titles. so i foundthishack, and installed it. but this hack doesn't quite work, whenyouclick on the action it gives you the confirm button but no fieldstoenter anything in. i just read the last 2 pages here.

so i guess my problem is something with the ucash settings, or maybeimissed something when doing the hack. anybody know what theproblemcould be?

i had to use the install script to first uninstall the old ucash database settings

then reinstall the new ones using the new version of ucash's install script and mine worked then however i lost my old settings

ps this hack is for the older version of ucash

Wordplay
02-13-2005, 03:39 PM
the old ucash settings? i never had an older version of this hack on vbulletin. just this one. first time install.

Wifey
05-18-2005, 03:50 AM
Just for the record, if this is standard in the new uCash it's sure as hell not working on my board. I had it working great then upgraded and this won't work. AND the bbcode in the new usertitle as you say it works doesn't.

Any ideas Zachery? I didn't see anything on Geeky Designs.

msimplay
05-18-2005, 04:43 AM
Just for the record, if this is standard in the new uCash it's sure as hell not working on my board. I had it working great then upgraded and this won't work. AND the bbcode in the new usertitle as you say it works doesn't.

Any ideas Zachery? I didn't see anything on Geeky Designs.

I had to use the uninstall script and then reinstall the tables using the install script

I didn't touch any of the files after upgrading