vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Encheferizer (https://vborg.vbsupport.ru/showthread.php?t=134327)

cheesegrits 01-01-2007 10:25 PM

Quote:

Originally Posted by bplinson (Post 1148581)
Found a bug.

Fixed a bug. :D

I'll release a 1.05 with this fix in it as soon as I fix the moderated post thing cherylferraro noticed. For now, if you want you can edit your "Encheferizer - showthread title" plugin, and replace the PHP code with this version:

PHP Code:

// Product: Encheferizer 1.05
// Author: Hugh Messenger (cheesegrits)

global $encheferize_all_perps$encheferize_perps$chef_parser$swedish_chef$chefids$chefforumids$vuserid;

if (
in_array($thread['forumid'],$chefforumids))
{
    
$thread['title'] = $swedish_chef->encheferize(strip_bbcode($thread['title'], true)); 
    
$foruminfo['title'] = $swedish_chef->encheferize(strip_bbcode($foruminfo['title'], true)); 
    
$foruminfo['description'] = $swedish_chef->encheferize(strip_bbcode($foruminfo['description'], true)); 

}
else if (
in_array($thread['postuserid'],$chefids) and 
            (!
$vuserid or !in_array($vuserid,$chefids) or $encheferize_all_perps or
                (
$encheferize_perps and $thread['postuserid'] == $vuserid)
            )
        )
{
    
$thread['title'] = $swedish_chef->encheferize(strip_bbcode($thread['title'], true)); 


-- hugh

cheesegrits 01-01-2007 10:52 PM

Quote:

Originally Posted by cherylferraro (Post 1148684)
On my board unregistered posters are moderated. I just noticed that all of their posts have been Encheferizerized. Have I set something up incorrectly?

I had to disable the hack to get their posts to display normally...

I think I have a fix for this. It's a little hard for me to be sure, as I'm on the road and don't have access to my actual test server ... so I'm having to (very carefully!) test it on a couple of live servers.

[Edit - I just got into my test board, and this fix works for me just fine. I set guests to be moderated, posted, approved, posts show up normally.]

Could you try this. Find your "Encheferizer - main postbit", and replace the PHP with the following. There's actually only one small change, but it's easier to just copy & paste the whole thing in there:

PHP Code:

// Product: Encheferizer 1.05
// Author: Hugh Messenger (cheesegrits)

global $thread$encheferize_all_perps$encheferize_perps$chef_parser$swedish_chef$chefids$chefforumids$vuserid$chef_tag_list;

$safeScripts = array(
    
'showpost',
    
'showthread'
);

if (
in_array(THIS_SCRIPT$safeScripts) and (
        
in_array($GLOBALS['forumid'],$chefforumids) or (
            
$this->post['userid'] and (
                
in_array($this->post['userid'],$chefids) and (
                    !
$vuserid or
                    !
in_array($vuserid,$chefids) or
                    
$encheferize_all_perps or (
                        
$encheferize_perps and
                        
$this->post['userid'] == $vuserid
                    
)
                )
            )
        )
    )
)  
{
    
$this->post['title'] = $swedish_chef->encheferize(strip_bbcode($this->post['title'], true)); 
    
$cheftext $chef_parser->do_parse($swedish_chef->bb_encheferize($this->post['pagetext'],0,$chef_tag_list,$didCut),0,1,1,1,1);


Let me know if this fixes your problem, and I'll wrap this and another change up and release 1.05.

-- hugh

cheesegrits 01-07-2007 06:49 PM

Uploaded the 1.05 ZIP, which just includes the above two fixes (forum description and guest posting bugs).

-- hugh

cherylferraro 01-10-2007 04:54 PM

I just installed the latest files and the moderated posts are displaying normally.

Thank you! :D

msu2k 01-10-2007 09:26 PM

Is there a way to set it so that a chefed user sees ALL posts on ALL forums as chefed, but everyone else sees them normally?

cheesegrits 01-11-2007 08:28 PM

Quote:

Originally Posted by msu2k (Post 1155784)
Is there a way to set it so that a chefed user sees ALL posts on ALL forums as chefed, but everyone else sees them normally?

No, not at the moment, but I'm always open to suggestions. :D

Would you want everyone else to see those victims posts encheferized, or normal?

I'll look at adding a new category of "victim", that see the entire board encheferized. Watch this space.

-- hugh

chick 01-18-2007 04:02 PM

i have just the member to pull this on... thanks

msu2k 01-18-2007 05:10 PM

Quote:

Originally Posted by cheesegrits (Post 1156514)
No, not at the moment, but I'm always open to suggestions. :D

Would you want everyone else to see those victims posts encheferized, or normal?

I'll look at adding a new category of "victim", that see the entire board encheferized. Watch this space.

-- hugh

I just thought it would be amusing for a victim to see everything chefed but for everything to appear normal to others...they'd probably have to start questioning the victim's sanity. ;)

dodgechargerfan 01-19-2007 01:56 PM

Love it!

It does mess up the smilies though. I can't see a simple way to fix that, though, as smiley replacement text could be anything.

The trade-off is worth it. I put the board owner in as the first "victim." He'll love it once he figures it out.

project-Buckfas 01-19-2007 03:20 PM

Perfect for an april fools

Sadie Frost 01-20-2007 10:37 PM

OH MY GOD that is fantastic! Awesome! :D

cheesegrits 01-22-2007 06:36 PM

Quote:

Originally Posted by dodgechargerfan (Post 1162814)
Love it!

It does mess up the smilies though. I can't see a simple way to fix that, though, as smiley replacement text could be anything.

The trade-off is worth it. I put the board owner in as the first "victim." He'll love it once he figures it out.

Hmm, normal smilies should work fine. Are you using My Smilies? I only recently found out about My Smilies, and haven't had a chance to modify the chef to handle custom smilies on a per user basis - although the fix is simple enough, and it should be in the next release.

-- hugh

cheesegrits 01-22-2007 06:40 PM

Quote:

Originally Posted by Sadie Frost (Post 1163857)
OH MY GOD that is fantastic! Awesome! :D

Well thank you! Comments like that make it worth the effort.

-- hugh

WATRD 01-29-2007 10:49 PM

Fun mod! The only thing that would make it better, would be if you could Encheferize an entire usergroup. That way, you could use it as penalty in conjunction with the Infraction system. Accumulate a certain number of points and join the Encheferizer group for a while :)

bluechris 01-30-2007 06:28 PM

I had edit abit the bb_encheferizer.php to change the greek words for those who have greek language in their forums.

Great thing m8 we cryed here with some guys that we did it.

cheesegrits 02-05-2007 01:21 AM

Quote:

Originally Posted by WATRD (Post 1170143)
Fun mod! The only thing that would make it better, would be if you could Encheferize an entire usergroup. That way, you could use it as penalty in conjunction with the Infraction system. Accumulate a certain number of points and join the Encheferizer group for a while :)

Someone else suggested that in a PM last week, and I think it's a great idea. I'm working on adding that feature now, hope to have it ready soon.

Don't know why I didn't think of this myself

Thanks for the feedback.

-- hugh

cheesegrits 02-05-2007 01:27 AM

Quote:

Originally Posted by bluechris (Post 1170742)
I had edit abit the bb_encheferizer.php to change the greek words for those who have greek language in their forums.

Ooooh. I hadn't thought about non-English to Swedish Chef translations. Not a lot I can do about that really, as I'd need to understand a lot more than I do about linguistic phonemes and all that in each target language.

What I might look at doing at some point is making the replacement terms be a lookup array, then provide a hook so you can add / redefine them with a simple plugin.

Worth doing just for very thought of The Swedish Chef speaking in Polish or Greek or Italian or ... LOL!!

Quote:

Originally Posted by bluechris (Post 1170742)
Great thing m8 we cryed here with some guys that we did it.

Yup, I've had similar experiences. Literally tears running down my face and sides hurting from laughing so much. Especially when the victims start cussing and threatening ...

Thanks for the feedback, makes the work worthwhile. :)

-- hugh

ubblite 02-05-2007 07:16 AM

Funny mod, but for me even if you enter which forum ID & user ID in Encheferizer, it still shows up for everyone as Encheferizer. Strange.

cheesegrits 02-06-2007 11:01 PM

Quote:

Originally Posted by ubblite (Post 1175037)
Funny mod, but for me even if you enter which forum ID & user ID in Encheferizer, it still shows up for everyone as Encheferizer. Strange.

Not quite sure what the problem is.

If you specify any forum ID's, then all posts in those forums will appear encheferized to everyone, ragardless of userid.

If you specify User ID's, and don't change the "Victims see as ..." options, then those users posts will appear encheferized to everyone else, but normal to the "victims", in any forums. Unless of course they are posting in a chef'ed forum, in which case the above rule applies.

-- hugh

ubblite 02-07-2007 07:04 AM

You're right cheesegrits - I must have misunderstood the UserCP options. Thanks.

cheesegrits 02-07-2007 11:22 PM

No problem. It's easy to get confused, even I do sometimes. Being very customizable can be a two edged sword.

-- hugh

cheesegrits 02-08-2007 02:06 AM

Looking for a couple of volunteers to test 1.07, which adds the Usergroup ID list, as requested by several folk, who had the bright idea of being able to tie the Encheferizer to an "infractions group".

So 1.07 adds "Group ID(s)" to the ACP options. If you specify one or more groups, ALL POSTS (and forum names, titles, descriptions, etc) on the ENTIRE site will be encheferized for those users.

I've tested on a couple of boards, seems to work OK, but I'd like a couple of other folk to try it before I release.

-- hugh

phpdevrus 02-11-2007 03:47 AM

:-) Freaking hilarious...

Love it. lol

Going to install it now.

cheesegrits 02-27-2007 05:38 PM

Quote:

Originally Posted by phpdevrus (Post 1179651)
:-) Freaking hilarious...

Love it. lol

Going to install it now.

Don't forget to push that Install button, so I can keep you informed about upgrades and bug fixes (not that there are any bugs, of course, LOL!).

I finally found some time to work on the infraction group stuff, Rob is testing it for me now, should be released real soon.

-- hugh

Soliloquy 03-14-2007 04:37 AM

I just installed this and plan to unleash it on my forum on April Fool's Day. Oh, the pandemonium that will ensue...:)

Two things I would love to see though: it would be nice if there was an option to allow a user to turn it off when they get tired of it. And wouldn't it be great if it temporarily changed the affected user's avatar to an image of the Swedish Chef? Cheesegrits, if you're still developing this mod, please consider adding those features. And thank you so much for a great mod! My members will be in stitches:up:

kal-L 03-14-2007 04:56 AM

Quote:

Originally Posted by cheesegrits (Post 1141947)
Oh, but that's where the fun is! I wish I could point you at some of the threads where the victims are trying to work out what is going on, and everyone else is just having a fine old time. But I don't want to publish those links without explicit permission from the admins running those boards. All I can tell you is that some of the threads have reduced grown admins to tears of helpless laughter.

Yes, it does cause quite a commotion for a little while, but a) watching the victims curse and threaten and generally go ape sh*t in Swedish Chef speak is just too funny for words, and b) you can turn it off any time, and let the victims know that if they annoy you again, they'll get encheferized again, or booted.

Basically, the reason I wrote this was as a last resort before having to ban trouble makers. As I said in the release ntoes, encheferizing has a way of bringing peer pressure to bear on trouble makers. You don't even have to say a word - your members will eventuall work out what's going on. It worked on Usenet 15 years ago, and it seems to work on bulletin boards now. :)

-- hugh


Your the best! :D
Indeed this has just been added.. and I do recall Usenet ;)

darkman 03-17-2007 08:07 PM

heh - classic!
Thanks and installed :)

davelacey 03-18-2007 10:55 AM

Funniest hack ever. Installed.
Great stuff.
Thanks. :D

IamRob 03-21-2007 05:29 PM

Quote:

Originally Posted by Soliloquy (Post 1203059)
I just installed this and plan to unleash it on my forum on April Fool's Day. Oh, the pandemonium that will ensue...:)

Two things I would love to see though: it would be nice if there was an option to allow a user to turn it off when they get tired of it. And wouldn't it be great if it temporarily changed the affected user's avatar to an image of the Swedish Chef? Cheesegrits, if you're still developing this mod, please consider adding those features. And thank you so much for a great mod! My members will be in stitches:up:

You'll actually be able to do this with the new update of the chef. One of the changes is a "per usergroup" function. You can simply make that usergroup's avatar the Chef.

pete_brady 03-31-2007 11:08 PM

this is the best thing ever

masterme 04-01-2007 07:08 AM

Also installed this, very funny!
How do I get it to work on the index page? Since that has no id?

Jaxel 04-01-2007 07:38 PM

I found a bug... if someone uses the [IMG] tag... the image gets broken because it enchenferizes the link to the image as well.

Sadie Frost 04-02-2007 12:05 AM

Love it love it love it :D

A nice thing for the future (for April Fools jokes lol) would be the option to automatically make all forums encheferized, so you don't need to enter all your forum ids ;)

Thanks for making this - I laughed so hard today! :D

Soliloquy 04-02-2007 02:15 AM

I had the same experience as Jaxel today; it broke all the posted images and the smileys too.

On the upside, I was able to display random avatars of the Chef with a little help from the vBulletin.org forum. I've attached a zip file of the six Swedish Chef avatars I used; they're all a bit on the large size (most are 100 pixels high) so you may want to resize them. Create a subdirectory named SwedishChef in the images/misc directory and upload them there. Then go to Plugins and Products: Plugin Manager, find the Encheferizer section, and click on Edit for the postbit_display_start hook. Add:

Code:

$newavatar = mt_rand(1, 6);
(Change the 6 to the number of Chef avatars you have.)

Next, edit your postbit template. Find:

Code:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
and comment it out. Below it add:

Code:

<td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="http://www.yourforum.com/images/misc/SwedishChef/swedish_chef$newavatar.jpg" border="0" /></a></td>

IamRob 04-14-2007 08:22 PM

Hugh, what's the deal?

Are you ever going to release the next update?

WhiteOx2 04-14-2007 11:51 PM

It's a pity any quoted text shows up as normal, otherwise this would be great.

Soonerdude 06-05-2007 12:00 AM

Someone needs to make a pig-latin version of this mod.

cheesegrits 01-17-2008 05:58 PM

Quote:

Originally Posted by WhiteOx2 (Post 1227922)
It's a pity any quoted text shows up as normal, otherwise this would be great.

Sorry about the massive time lag on my response, I had some family issues which prevented me spending much time on vborg, only just been able to start finding the time again.

I'm working on making this an option.

-- hugh

TheJordan 04-01-2008 09:18 PM

Here's come code I wrote fro dealing with smilies and html entities that get broken in Chef-speak. My only problem is when I put this into the for loop (~ line 106), the smilies and entities are moved to the front of the Encheferized text. I've only had a couple of minutes to mess with this, so I'm sure someone with more of an idea of what this loop is doing (cheesegrits?) will know how to fix this :)
PHP Code:

            if($char == '&')
            {
                
// check if this is an html entity
                
$goto null;
                
$entity $char;
                for(
$j=$i+1;$j<$maxLen;$j++)
                {
                    
$entity .= $string[$j];
                    if(
$string[$j]==';')
                    {
                        
$goto $j+1;
                        
$j $maxLen 100;
                        continue;
                    }
                }

                
// if we're actually dealing with an entity
                
if($goto != null)
                {
                    
$i $goto;
                    
$newString .= $entity;
                    continue;
                }
            }

            if(
$char == ':')
            {
                
// check if this is a smiley
                
$goto null;
                
$smiley $char;
                for(
$j=$i+1;$j<$maxLen;$j++)
                {
                    
$smiley .= $string[$j];
                    if(
$string[$j]==' ')
                    {
                        
$j $maxLen 100;
                        unset(
$smiley);
                        continue;
                    }
                    elseif(
$string[$j]==':')
                    {
                        
$goto $j+1;
                        
$j $maxLen 100;
                    }
                }

                
// if we're actually dealing with a smiley
                
if($goto != null)
                {
                    
$i $goto;
                    
$newString .= $smiley;
                    continue;
                }
            } 

BTW, been laughing my ass off all day. Best April Fools, ever. Thanks.

Phaedrus 04-05-2008 02:57 AM

I can't stop laughing...


All times are GMT. The time now is 01:33 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.02425 seconds
  • Memory Usage 1,893KB
  • 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
  • (3)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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