Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2004, 12:50 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Removing signatures in a specific forum.

Removing signatures in a specific forum.

Hi All

I have been looking on this site for a specific hack that will remove ALL post signatures within an Admin forum I have, say forum ID 10 (on VB 3.3).
All the other forums can stay as default and allow the user to chose if he post his sig or not.
Dose anyone know if there is something like this around?

Xray
Reply With Quote
  #2  
Old 10-29-2004, 01:10 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For existing posts you can run a query to update the database:

** UNTESTED **
[sql]update post, thread set post.showsignature=0 where post.threadid=thread.threadid and thread.forumid=10[/sql]

For new posts I'd suggest to modify build_new_post().
Reply With Quote
  #3  
Old 10-29-2004, 02:10 PM
Gadabout Gadabout is offline
 
Join Date: Oct 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open postbit or postbit legacy and search for

PHP Code:
            <if condition="$post['signature']">
            <!-- 
sig -->
                <
div>
                    
__________________<br />
                    
$post[signature]
                </
div>
            <!-- / 
sig -->
            </if> 
Replace with

PHP Code:

        
<if condition="$thread[forumid] != 10">
            <if 
condition="$post['signature']">
            <!-- 
sig -->
                <
div>
                    
__________________<br />
                    
$post[signature]
                </
div>
            <!-- / 
sig -->
            </if>
        </if> 
Reply With Quote
  #4  
Old 10-29-2004, 02:29 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, this will not remove signatures - it will just hide them
Reply With Quote
  #5  
Old 10-29-2004, 05:22 PM
Gadabout Gadabout is offline
 
Join Date: Oct 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you really... really don't want it in the db, you can edit functions_newpost.php

search for

PHP Code:
        // ### POST NEW POST ###
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post
                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                 showsignature, ipaddress, iconid, visible, attach)
            VALUES
                (
$threadinfo[threadid]$parentid, '" addslashes($post['title']) . "',
                 '" 
addslashes($post['postusername']) . "', $bbuserinfo[userid], " TIMENOW ",
                 '" 
addslashes($post['message']) . "', $post[enablesmilies]$post[signature],
                 '" 
addslashes($post['ipaddress']) . "', $post[iconid]$post[visible]$totalattachments)
        "
); 
replace with

PHP Code:
        if ($foruminfo[forumid] != 10)
        {
            
// Show Signature
            
$sigfield "showsignature,";
            
$sigvalue "$post[signature],";
        }
    
        
// ### POST NEW POST ###
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post
                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                 
$sigfield ipaddress, iconid, visible, attach)
            VALUES
                (
$threadinfo[threadid]$parentid, '" addslashes($post['title']) . "',
                 '" 
addslashes($post['postusername']) . "', $bbuserinfo[userid], " TIMENOW ",
                 '" 
addslashes($post['message']) . "', $post[enablesmilies]$sigvalue
                 '" 
addslashes($post['ipaddress']) . "', $post[iconid]$post[visible]$totalattachments)
        "
); 
Personally I'd be more inclined to use the first option as this is really a pretty basic template mod that doesn't need to be updated when you update your vb version.
Reply With Quote
  #6  
Old 10-29-2004, 08:15 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW, Thanks for the help on this one guys. I really appreciate it.

I will have a go at this now.

Xrayhead
:squareeyed:
Reply With Quote
  #7  
Old 10-29-2004, 08:30 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gadabout
Open postbit or postbit legacy and search for

PHP Code:
            <if condition="$post['signature']">
            <!-- 
sig -->
                <
div>
                    
__________________<br />
                    
$post[signature]
                </
div>
            <!-- / 
sig -->
            </if> 
Replace with

PHP Code:

        
<if condition="$thread[forumid] != 10">
            <if 
condition="$post['signature']">
            <!-- 
sig -->
                <
div>
                    
__________________<br />
                    
$post[signature]
                </
div>
            <!-- / 
sig -->
            </if>
        </if> 
Installed and working a treat, thanks again all.

Xrayhead

PS, Do you think someone should put this in the mini hacks section??
:squareeyed:
Reply With Quote
  #8  
Old 10-29-2004, 08:32 PM
Gadabout Gadabout is offline
 
Join Date: Oct 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it worked for you, it's a template mod, so it should probably be posted at vbulletintemplates.com.

If you want to post it as your mod, have at her!

Reply With Quote
  #9  
Old 04-04-2005, 07:19 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi All

I have still got this thread installed on my board and am trying to get it to work with more that one forum!!!! I have tryed to change the the following:
<if condition="$thread[forumid] != 10">
to
<if condition="$thread[forumid] != 10, 11">
or
<if condition="$thread[forumid] != 10,11">

and also to
<if condition="$thread[forumid] != 10">
<if condition="$thread[forumid] != 11">

But I get Parse error! :disappointed:

Can someone point me in the correct direction PLEASE.
Thanks in advance.

Xray
Reply With Quote
  #10  
Old 04-04-2005, 08:12 PM
TyleR's Avatar
TyleR TyleR is offline
 
Join Date: Nov 2004
Location: North Carolina
Posts: 349
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="($thread[forumid] !=10) OR ($thread[forumid] !=11)">
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 01:25 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.04492 seconds
  • Memory Usage 2,293KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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