PDA

View Full Version : Signatures.


Shin Shin
10-23-2006, 04:33 AM
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:
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>With: <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: <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: <input type="hidden" name="signature" value="1" id="cb_signature" />

In newreply, replace: <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: <input type="hidden" name="signature" value="1" id="cb_signature" />

In newthread, replace: <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: <input type="hidden" name="signature" value="1" id="cb_signature" />

In pm_newpm, replace: <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: <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: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.