Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[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
  #332  
Old 02-20-2007, 10:01 PM
stinger2's Avatar
stinger2 stinger2 is offline
 
Join Date: Jul 2005
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by itsid View Post
yupp, my fault printthread.php sure!

Okay, the error comes from a strange behaviour of
PHP Code:
$thank['userid'
set by Abe1s hack,
If you never updated that hack the only workaround is to add some extra db querys.
In fact I'm pretty sure that there was an update... nevermind.

I've got the solution somewhere in my diskbackups,
as soon as it is found, I'll attach it to this post.

stay tuned
'sid
hi sid

you mean this?

i still have it in my favourite
https://vborg.vbsupport.ru/showpost....&postcount=259

BTW
I changed it again since the 4 queries did fix the thankyou button disappearing.......but some members had still complaints about the ajax

ps. only two members had problem

rgds
Reply With Quote
  #333  
Old 02-20-2007, 10:02 PM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi xenon,

Well to add that button, all you have to do is upload the image from post #74 to your images/editor folder (location may vary depending on style)

then go to ACP -> custom vB Codes -> hide
and add the imagepath like
PHP Code:
/images/editor/ed-hide.gif 
that'll do for new-post or new-thread editors.

for quickreply you'll have to add editor-buttons to quickreply (hack should be out there for doing so)

'sid


[EDIT]
WOW stinger2 thanks alot!

I've searched my harddrives *dough*
That's exactly what I was searching for
now added that link to firstpost, for me to remember

So skavanger .... try that one; it'll do for you I guess
Reply With Quote
  #334  
Old 02-21-2007, 02:13 AM
xenon58 xenon58 is offline
 
Join Date: Dec 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey sid, thnx for the reply bud. your tip is greatly appreciated, i've got it to work

here is a small how-to if you would like to add a button to your quick-reply and quick-edit. after some mocking around, i've got it placed where i wanted and of course, work the code

templates to edit are:

1. showthread_quickreply

2. postbit_quickedit


search for the following code

PHP Code:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar[imgdir_editor]/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]/>
</
div></td

and add underneath


PHP Code:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_hide"><img src="$stylevar[imgdir_editor]/en-hide.gif" width="21" height="20" alt="$vbphrase[wrap_hide_tags]/>
</
div></td

make sure path to the image is a correct one.


hope this helps to those who needs it.
Reply With Quote
  #335  
Old 02-21-2007, 03:52 AM
MPDesignZ MPDesignZ is offline
 
Join Date: Feb 2007
Location: Daytona Beach, FL
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MissKalunji View Post


u dont see that icon in the tool bar when ur posting?
Yes I do, but I got it to work the way I wanted it to with the addition of the attachments hack that goes with the post thanks hack for version 3.5. Thanks for your help and thanks to the other member who posted his help.

MP
Reply With Quote
  #336  
Old 02-21-2007, 04:09 AM
ahmednadir ahmednadir is offline
 
Join Date: Feb 2007
Location: Watford
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this great mod
I've added it to my site but I can't get it to work
I've installed it, checked the settings, added the button (gif from my pc) and everything is looking fine
I come to hide but the hide hack does'nt work

for example

if I enter [hide]hide hack not working for me[/hide]

It appears the same [hide]hide hack not working for me[/hide]

any idea what might be causing this problem?
thanks
Reply With Quote
  #337  
Old 02-21-2007, 11:00 AM
itsid itsid is offline
 
Join Date: Oct 2006
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're sure that you did not posted that to forumid 2 ?

Oh and remember: NO PREVIEW you MUST post to see if it's working.

'sid
Reply With Quote
  #338  
Old 02-21-2007, 02:49 PM
xenon58 xenon58 is offline
 
Join Date: Dec 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ahmednadir View Post

if I enter [hide]hide hack not working for me[/hide]

It appears the same [hide]hide hack not working for me[/hide]

any idea what might be causing this problem?
thanks
first make sure that you do have 'post thank you' hack, before you install this one
and when you are trying to see if its working or not, you will have to post a thread
using hide tags, then login as a different user, but not an administrator!!!, and see
if it worked for ya or not. remember, admins will be able to see everything that is in
hide tags, even not your own posts. so make sure when testing, you are using user
with regular permissions. do that, and then say if it worked or not. g'luck
Reply With Quote
  #339  
Old 02-21-2007, 06:26 PM
Skavenger Skavenger is offline
 
Join Date: Sep 2005
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stinger2 View Post
hi sid

you mean this?

i still have it in my favourite
https://vborg.vbsupport.ru/showpost....&postcount=259
Quote:
Originally Posted by itsid View Post
So skavanger .... try that one; it'll do for you I guess
It's working fine now, thank you!
Reply With Quote
  #340  
Old 02-22-2007, 11:44 AM
bollie's Avatar
bollie bollie is offline
 
Join Date: Jun 2006
Location: Zele (Belgium)
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by itsid View Post
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
Thx work nice
Reply With Quote
  #341  
Old 02-23-2007, 04:36 PM
hotmasala4u hotmasala4u is offline
 
Join Date: Nov 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi may be u guys knw how 2 not have a pop up and then put what text u wannna hide rather than just having {hide} {/hide} to come in the post
Reply With Quote
Reply


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 05:15 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.06306 seconds
  • Memory Usage 2,449KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_php
  • (6)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_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