PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2005-10-20 20:46:52

sfackler
Guest

Optional Signatures 1.0 1.0

Code:

##
##
##        Mod title:  Optional Sigs 
##
##      Mod version:  1.0 
##   Works on PunBB:  1.2.9 
##     Release date:  2005-10-20 
##           Author:  sfackler 
##
##      Description:  This mod lets you say if you want your sig to be displayed after your post. 
##
##       Affects DB:  Yes 
##
##   Affected files:  post.php 
##                    edit.php 
##                    viewtopic.php 
##                    lang/English/post.php 
##
##            Notes:   
##
##     Generated By:  Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

 

#2 2006-04-20 21:14:43

Mako
Member
Registered: 2005-01-13
Posts: 24

Re: Optional Signatures 1.0 1.0

When making a new post/thread, it ignores the checkbox.

Find

// Insert the new post
$db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error());

Replace with

// Insert the new post
$db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id, showsig) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.', '.$showsig.')') or error('Unable to create post', __FILE__, __LINE__, $db->error());

Last edited by Mako (2006-04-20 21:15:14)

Offline

 

#3 2006-04-22 11:56:05

Mako
Member
Registered: 2005-01-13
Posts: 24

Re: Optional Signatures 1.0 1.0

When posting via the Quick Post form, it does not put in the signature.

viewtopic.php

-----FIND-----
<p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

-----REPLACE WITH-----
<p><input type="hidden" name="showsig" value="1" /><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

And since I hacked Easy Poll to work with this, here's the code for that.

viewpoll.php

-----FIND-----
<p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

-----REPLACE WITH-----
<p><input type="hidden" name="showsig" value="1" /><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

Offline

 

#4 2008-02-01 09:51:52

emoc
New member
From: France
Registered: 2008-01-31
Posts: 1
Website

Re: Optional Signatures 1.0 1.0

Hello,

I would like to use this mod, but it is no more available in the projects archive. Has anybody kept those files?

Thanks


codelab : forum du code créatif //////// urzhiata : sons, pixels & court-circuits

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.