vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Signatures. (https://vborg.vbsupport.ru/showthread.php?t=129748)

Shin Shin 10-23-2006 04:33 AM

Signatures.
 
Is there, or can someone create a mod that forces users to have a signature, as soon as they register? I couldnt care less if its "signature" or " ", as long as there is something automatically there.

I want this very badly, as it would solve the "no signature" problem in old posts. :(

evenmonkeys 10-23-2006 06:36 AM

Pretty tacky way, but I guess you could just replace:

postbit template:
Code:

                <if condition="$post['signature']">
                <!-- sig -->
                        <div>
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->
                </if>

With:
Code:

                <if condition="$post['signature']">
                <!-- sig -->
                        <div>
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->
                <else />
                <!-- no sig -->
                        <div>
                                __________________<br />
                                &nbsp;
                        </div>
                <!-- / no sig -->
                </if>

Edit: Nevermind. I didn't understand what you meant. You want it so their current signature would work for those first posts that people usually have when they don't have a signature, right? I think that could be as easy as taking out the option to allow a signature, set it to 1 so that it's always enabled, and then run a query on your database to change all showsignatures in the post table to 1 that are currently 0. I can toy with that tomorrow if someone else doesn't get to it first.

Shin Shin 10-23-2006 07:31 AM

Correct, thats is what I want. Since im no wiz at this, I figured it would be possible to just completely force a signature (real signature, not a replacement, but thanks and kudos), so when they change it after posting it would be updated.

evenmonkeys 10-23-2006 10:07 PM

Alright- I think I got most of what you need working here. Before you do anything, please please please make a backup of your database; your post table at the least.

First of all...
In SHOWTHREAD, replace:
Code:

                                                        <if condition="$bbuserinfo['signature']">
                                                                <div style="float:$stylevar[right]"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label></div>
                                                        </if>

With:
Code:

                                <input type="hidden" name="signature" value="1" id="cb_signature" />
In newreply, replace:
Code:

                                                <if condition="$bbuserinfo['signature'] != ''"><div><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label></div></if>
With:
Code:

                                                <input type="hidden" name="signature" value="1" id="cb_signature" />
In newthread, replace:
Code:

                                                <if condition="$bbuserinfo['signature'] != ''"><div><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label></div></if>
With:
Code:

                                                <input type="hidden" name="signature" value="1" id="cb_signature" />
In pm_newpm, replace:
Code:

                                                <if condition="$bbuserinfo['signature']"><div><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label></div></if>
With:
Code:

                                                <input type="hidden" name="signature" value="1" id="cb_signature" />
That should be it for the template modifications. There might be another one or two- so if you still notice anyone without signatures, let me know and I'll see if I can find some more. Now we need to edit the database. This is the point where you need to have made a backup. I really do not want you to lose your posts if something goes wrong.

All we're doing is replacing all 0's with 1's in the showsignature field in the post table. You can do that via "Execute SQL Query" of the adminCP. In Manual Query, enter this:
Code:

UPDATE post SET showsignature='1' WHERE showsignature='0'
Now I'm not too keen on how vBulletin and PHP plays together so you'll need to manually edit your tablename if you have a prefix. For example, if your prefix is "site_" then you'll want "site_post" instead of "post".

Make sense? After that, you should be all good to go. They won't be able to select no signature anymore, and all posts to date will show signatures. =D

Any questions? Let me know. Feel free to use my messengers as well if you need quicker help.

Shin Shin 10-23-2006 10:58 PM

If you were a woman, I would take you out to eat.

I dont remember exactly what else came up when I searched the templates, but i think one was "userinfraction", and there was some other one also, so I went ahead and replaced it there also.

[edit] it was "edit post".

Ahh the irony...

evenmonkeys 10-24-2006 12:24 AM

Haha. Yeah. What you're replacing is basically the same thing everywhere. I just like being specific as that's how I like people talking to me. It's never my goal to make someone feel small. I'd just rather explain everything as best as I can the first time so they've understood what needs to be done.

Again, if you need anymore help, let me know. =D Glad it works for ya.


All times are GMT. The time now is 12:02 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.01085 seconds
  • Memory Usage 1,735KB
  • 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
  • (11)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete