Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
[hide] hack incl post thank you "addon" Details »»
[hide] hack incl post thank you "addon"
Version: 0.3.5, by itsid itsid is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.2 Rating:
Released: 11-05-2006 Last Update: 12-08-2006 Installs: 863
Uses Plugins
Additional Files  
No support by the author.

UPDATE
sid's [hide] hack 0.3.5

Hi again,

I've tried my best to build a [hide] hack that will fit to to
the wonderful POST THANK YOU HACK

but for sure you can use it without, then it'll work if user replies to a post with hidden content

You can coose in acp to show hidden content to admins mods or users of a certain usergroup (if you have useradmins or something) too.

It will show up some hint that will let your users know what to do (thank, answer, or even nothing)
by now with some small text, soon with a set of images

BUT
  • my english is way off what I want it to be, so please go ahead and edit the language file to your needs

NOW UPDATED

Thanks to Andreas of vbhacks-germany
  • no hidden content visible in archive
  • no php edits necessary no more
  • kicked out bitfield-code

    and further
  • no hidden content visible in printthread.php if not in showthread.php
  • now with a set of small images showing up as hint
  • and least updateurl in acp
have fun

cheers
'sid

ps Sorry for updating that fast

UPDATE 0.3.0
uninstall previous version before installing the update!
So, here's what you've all been waiting for *grin*
Tha ajaxified version of my hide hack.

BUT, this is rather bruteforcing ajax, so be warned
First: you could fully disable ajax for this script in ACP!
Now how it goes, it checks the length of pagecontent every three seconds (usersides, no worries about serverload here), and if it finds some new "content" like a filled thanks-box or a new post it calls all the posts that have hidden content (of this page only of course) and tries to refill the postbits,
this causes some sql-queries, almost as much as to totally reload the page itself.
AS soon as I find a more elegant method I will update again.
Nothing else was changed though since 2.6, only modified in handling the ajax-request.
If you encounter any problems with the ajax of this script, just deactivate,
no javascript at all then will be loaded from this script, and you'll have a "normal" version in hands.
(size is due to an pic-install-help-image )

UPDATE 0.3.5
reduced querys,
smarter installations code.

that's all

cheers
'sid

PS If you encounter any problems not seeing thanked posts hidden content after reload,
try this codechange

PPS Sorry, Support only for those who clicked "install"

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
lange

Comments
  #252  
Old 12-29-2006, 10:43 PM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would you do me a favour and try a clean install without any part of existing database?
then install post_thanks and hide and check again?

'sid

ps I'll try to build up a new plugin for testing purpose to see where it messes up with vbulletin, that'll take a while
Reply With Quote
  #253  
Old 12-30-2006, 09:17 AM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that is already done sid........with a clean install of vbulletin your hack works perfectly good.
no problem what so ever....so it has to be some code left over from something in the past in my database,,,,,,and i dont have a clue where and how to find it...i will setup a test board some where so you and i can investigate it

thanks again
Reply With Quote
  #254  
Old 12-31-2006, 12:38 AM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

stinger...
as you say that again...
Did you checked your plugin manager? and took a VERY CLOSE look ?
Maybe the "ugly" Plugin is just a plugin and no product, and maybe it's listed as a vbulletin plugin because there is no corresponding product.
And/Or did you also checked the plugin-table directly in your database?
(take a screenshot of your pluginmanager if you are unsure)
I'll go and find the sources of those plugins then

'sid

PS My extra plugin is still as buggy as it is overloaded
Reply With Quote
  #255  
Old 12-31-2006, 04:25 PM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

n0p..nothing else

http://www.hostmypiconline.com/images/hed.jpg

http://www.hostmypiconline.com/images/hed2.jpg


http://www.hostmypiconline.com/images/hed3.jpg

http://www.hostmypiconline.com/images/hed4.jpg
Reply With Quote
  #256  
Old 01-02-2007, 02:33 AM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,
got a small debug plugin to work now (see attachement)

infact it is less debugging but more a "show the variables" plugin :classic:

Import it as a plugin
AND
disable the fetch hide tag plugin (don't forget!)

Output of that plugin is only visible to usergroupid 6 (admins)

Now, go to your forums and thank or reply to any hidden content
(best not in firstpost and not one of your own postings)

Copy&paste output into this thread. (this thread is linked inside the plugin )

Right afterwards enable the fetch hide tag plugin and disable or delete the debug plugin (three additional databasequerys)

'sid

PS This plugin is ONLY if you have installed Abe1s Post_Thanks Hack, without that you'll get db-errors!!
Reply With Quote
  #257  
Old 01-02-2007, 03:18 PM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the info i get sid.....dont know if any thing is wrong ...

but yesterday something did get my attention .....when i chose (disable ajax features)......when i chose...disable problematic ajax feature....the hide hack does not work anymore..........

so logicaly...it means that my board has some ajax problem.....dont know how to check it or correct it though..i am investigating now....

here is the debug info

regards
S2

Quote:
hide-hack DEBUG Information only visible to adminsglobal information
This Script :showthread
Post userid :2433
Own userid :2
Forumid :102
First postid :139711
thanked first post : NOPE
This postid :139711
thanked this post : NOPE
Replied to this thread : NOPE
hide options
This Script :showthread
Active :1
AJAX :1
Not in forums :
Show admins :0
Show mods :0
Show usergroups :
Show thanked :1
Show posted :1
thank options
Only first (all) :0
Only first (seperate) :
Thank array userid:1649
Thanks array userid :1649
Reply With Quote
  #258  
Old 01-02-2007, 03:53 PM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi stinger..
Quote:
First postid :139711
thanked first post : NOPE
This postid :139711
thanked this post : NOPE
Replied to this thread : NOPE
You have to thank a post to let me get where I want to
If you do nothing, the hack wont do anything and no error occurs,
Sorry should have told you: this has to be within a "should be unhidden content" post but still is hidden

go ahead, try again

'sid

about the disable problematic ajax functions:
The hack does not need any ajax at all, but without you'll have to relaod the page to see what's hidden (as in early versions) on the other hand that's exactly where your error is around.
And yes; if ajax isn't fully enabled the hide-hack disables it's own ajax features as well.
Reply With Quote
  #259  
Old 01-02-2007, 05:09 PM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry sid....it was taken after i removed the thank you and refreshed to see what happens...

this is it

BTW.....the reply to see the hidden content option is working fine....the hidden content becomes unhidden..and remains unhidden with refresh...or when you go somewhere else and come back.....is there any difference between the two ???


Code:
hide-hack DEBUG Information only visible to adminsglobal information
This Script :showthread
Post userid :2433
Own userid :2
Forumid :102
First postid :139711
thanked first post : YES
This postid :139711
thanked this post : YES
Replied to this thread : NOPE
hide options
This Script :showthread
Active :1
AJAX :1
Not in forums :
Show admins :0
Show mods :0
Show usergroups :
Show thanked :1
Show posted :1
thank options
Only first (all) :0
Only first (seperate) :
Thank array userid:1649
Thanks array userid :1649
Reply With Quote
  #260  
Old 01-02-2007, 10:13 PM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it is.. a huge difference
if you thanked this hack won't do a db query if you (as you have it) can thank each post and not only the first one.
but in your case that won't do somehow.
so replace your fetch hide tag plugin by this code:
PHP Code:
if ($this->registry->options['sid_hide_active'] == '1' AND stristr($post['message'],'[hide]')){
            global 
$vbulletin$vboptions$bbuserinfo$db$threadid$hide_call$postid;
            
$bbuserinfo $this->registry->userinfo;
            
$post $this->post;
            
$hide_read false;
            
$hide_img_set 0;
            
$hide_replied '';
            
$hide_thanked '';
            
$hide_stop 0;
            if (!empty(
$this->registry->options['sid_hide_notforum'])){
                
$sid_hide_forum_stop explode(",",$this->registry->options['sid_hide_notforum']);
                if(
in_array($thread['forumid'],$sid_hide_forum_stop)){
                    
$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU''\\1'$post['message']);
                    
$hide_stop 1;
                }
            }
            if(
$post['userid'] == $bbuserinfo['userid'] AND $hide_stop == 0){
                
$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU''<fieldset><legend><span class="highlight">'.$vbphrase[sid_hide_post_own].'</span></legend>\\1</fieldset>'$post['message']);
                
$hide_stop 1;
            }
            if (
$hide_stop != 1){
                if (
$this->registry->options['sid_hide_showadmin'] AND $bbuserinfo[usergroupid]==6){
                    
$hide_read true;
                }elseif (
$this->registry->options['sid_hide_showmod'] AND can_moderate($thread['forumid'])){
                    
$hide_read true;
                }elseif (!empty(
$this->registry->options['sid_hide_showusergroup'])){
                    
$hide_groups_see explode(",",$this->registry->options['sid_hide_showusergroup']);
                    if (
in_array($bbuserinfo['usergroupid'], $hide_groups_see)){
                        
$hide_read true;
                    }
                }
                if (
$vbulletin->options['sid_hide_showthanked'] AND $hide_read==false){
                    
$hide_img_set $hide_img_set 1;
                    if(
$vbulletin->options['post_thanks_forum_first_all'] == 1){
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$threadinfo[firstpostid]' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    } elseif (!empty(
$vbulletin->options['post_thanks_forum_first'])){
                        
$post_thanks_only_first explode("|",$vbulletin->options['post_thanks_forum_first']);
                        if (
in_array($threadinfo['forumid'], $post_thanks_only_first)){
                            
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$threadinfo[firstpostid]' AND userid='$bbuserinfo[userid]'");
                            if(
$hide_thanked !=''){
                                
$hide_read true;
                            }
                        }else{
                            
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$post[postid]' AND userid='$bbuserinfo[userid]'");
                            if(
$hide_thanked !=''){
                                
$hide_read true;
                            }
                        }
                    } else{
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$post[postid]' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    }
                }
                if (
$this->registry->options['sid_hide_showposted'] AND $hide_read==false){
                    
$hide_img_set $hide_img_set ;
                    
$hide_replied $db->query("SELECT COUNT(postid) AS count FROM "TABLE_PREFIX "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                    
$myreplies 0;
                    if(
$db->num_rows($hide_replied)){
                        while (
$h_post $db->fetch_array($hide_replied)){
                            
$myreplies += $h_post['count'];
                        }
                        
$myreplies vb_number_format($myreplies);
                    }
                    if(
$myreplies 0){
                        
$hide_read['userid'] = true;
                    }
                }
                if (!
$hide_call){
                    
$hide_call =$post['postid'];
                } else {
                    
$hide_call .=",".$post['postid'];
                }
                if(
$hide_img_set == 3){
                    
$hide_img $vbphrase[sid_hide_img_pot];
                } elseif (
$hide_img_set == 2){
                    
$hide_img $vbphrase[sid_hide_img_post];
                } elseif (
$hide_img_set == 1){
                    
$hide_img $vbphrase[sid_hide_img_thank];
                } else {
                    
$hide_img $vbphrase[sid_hide_img_sorry];
                }
                if(!
$bbuserinfo[userid]){
                    
$hide_read false;
                }
                if (
$hide_read == true){
                    
$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU''<fieldset><legend><span class="highlight">'.$vbphrase[sid_hide_post_show].'</span></legend>\\1</fieldset>'$post['message']);
                } else {
                    eval(
'$hide_fetch = "' fetch_template('sid_hide_noaccess') . '";');
                    
$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU'$hide_fetch$post['message']);
                }
            }
        } 
that'll add an own db query for thanked posts and is not using the original array.

This one will surely work.

(I hat to have unnecessary querys, but I see no other chance right now to get this to work in your forums.)

'sid

ps don't forget to delete the debug plugin! that's causing a lot of querys too
Reply With Quote
  #261  
Old 01-03-2007, 12:30 AM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what a genius solution sid........looked at the change you made.......and you know what..its working like a charm now.....

thanks for all your help and sorry for all the troubles i made...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.13058 seconds
  • Memory Usage 2,406KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete