vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Removing signatures in a specific forum. (https://vborg.vbsupport.ru/showthread.php?t=71129)

XrayHead 10-29-2004 12:50 PM

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

Andreas 10-29-2004 01:10 PM

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().

Gadabout 10-29-2004 02:10 PM

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> 


Andreas 10-29-2004 02:29 PM

Well, this will not remove signatures - it will just hide them ;)

Gadabout 10-29-2004 05:22 PM

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.

XrayHead 10-29-2004 08:15 PM

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

I will have a go at this now.

Xrayhead
:squareeyed:

XrayHead 10-29-2004 08:30 PM

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:

Gadabout 10-29-2004 08:32 PM

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!

:)

XrayHead 04-04-2005 07:19 PM

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

TyleR 04-04-2005 08:12 PM

<if condition="($thread[forumid] !=10) OR ($thread[forumid] !=11)">


All times are GMT. The time now is 02:59 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.01210 seconds
  • Memory Usage 1,780KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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