News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Advanced Signature

Started by emanuele, January 31, 2011, 02:46:04 PM

Previous topic - Next topic

drjman

Hi,
So i am having a little issue. I installed this mod again and it looks like it wasn't removed properly from the previous install. Once i installed it again i am now getting an error when i try to go to the SMF admin section.

Here is the error i am getting:
Fatal error: Cannot redeclare template_restore_signatures() (previously declared in /home/jordanrobbins/fsu-clan.com/Sources/Load.php(2213) : eval()'d code:2174) in /home/jordanrobbins/fsu-clan.com/Sources/Load.php(2213) : eval()'d code on line 2190

I tried looking in the load.php file, but i can't find anything that pertains to the error message. i am basically locked out of my admin stuff, so any help is appreciated.

Arantor

It won't be in Load.php; the only reason the error shows in Load.php is that's because that's where the template loader is. The duplicate is in Admin.template.php at the end of the file.
Holder of controversial views, all of which my own.


drjman

Awesome.
That did it!

thanks for the quick reply. I appreciate the help.

Kindred

uh oh...

I have a possible glitch here...

Installed the Advanced Signature mod.

I am getting errors filling my error log because the mod does not ncheck to see if the variable is filled before trying to assign it to another variable


8: Undefined index: website
File: /...../Sources/Subs.php

I have several pages of errors related to website, href, username, randomsignature, etc etc etc
many of them from this block of code


function mod_getSignatureByID($ID, $member = false){
global $modav_member;
if(!empty($member)){
$modav_member['username'] = $member['username'];
$modav_member['name'] = $member['name'];
$modav_member['href'] = $member['href'];
$modav_member['website']['url'] = $member['website']['url'];
$modav_member['website']['title'] = $member['website']['title'];
}



Even more concerning...   a user was able to post actual HTML in his signature! (which broke the layout for the rest of the thread, since he didn't close the html tag correctly.

lastly, when I attempted to run the maintenance to reset the users back to a single signature and remove the mod:

Fatal error: Cannot use string offset as an array in /....../Sources/Subs.php on line 4712
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

KensonPlays

I installed this mod, set it to 2 signatures. I tried it on myself (and "applied the changes" yes) but the char. count won't go down. I set it for 100 but it stays at 100, I don't know if it is actually counting it. I had to do 3 manual edits.

Owner of Mesozoic Haven

emanuele

#25
ops...you've found a bug.
I'm checking it.

Sorry, there is more than one bug and I also did a wrong copy&paste wiping out all the corrections I did... :'(

Okay, everything should be fine now. :)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

KensonPlays

Thanks, installing the update :)

Owner of Mesozoic Haven

npiccoli

I am using this mod in conjunction with SMF 2.0 and the laGusta theme by Dzinerstudio. I was wondering if there would be a way where administrators can disable everyone's signature on an entire topic with just the push of one button, compared to going through and modifying each users post one by one.

Thanks for the modification by the way, it does wonders. :)

emanuele

No, never though about a similar "admin tool".
It could be interesting, but would the users be able to change again the signature after an admin has removed it?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

npiccoli

Quote from: emanuele on July 13, 2011, 07:18:54 PM
No, never though about a similar "admin tool".
It could be interesting, but would the users be able to change again the signature after an admin has removed it?

Administrators would only be removing signatures from a topic, not the entire forum. Users would not be able to add a signature to their post again. Once an administrator removes all signatures from a topic, then having signature on the topic would be disabled for the life of the topic- unless re-enabled, then signatures would be set back to the default ones.

Kindred

That introdcues a whole new functionality to SMF...  In other words, this mod won't do that... And doing that would require some major changes to SMF itself.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

npiccoli

Quote from: Kindred on July 13, 2011, 11:05:35 PM
That introdcues a whole new functionality to SMF...  In other words, this mod won't do that... And doing that would require some major changes to SMF itself.

I thought it would be much simpler to do with this modification because it has the ability to select "no signature" before posting. Wouldn't that selected option be saved somewhere? If yes, then couldn't you just change the saved information to "no signature?" Perhaps there would be a way where each thread is saved somewhere in the database, with an extra field (i.e. signatures?), then another button could be added. If an administrator clicks that button, all existing signatures will be removed and then the ability to add a signature will always default to "no signature" for that particular thread.

That can't be TOO difficult, can it?

emanuele

Quote from: npiccoli on July 13, 2011, 10:07:02 PM
Administrators would only be removing signatures from a topic, not the entire forum.
Never mentioned the entire forum. ;)

Quote from: npiccoli on July 13, 2011, 10:07:02 PM
Users would not be able to add a signature to their post again. Once an administrator removes all signatures from a topic, then having signature on the topic would be disabled for the life of the topic- unless re-enabled, then signatures would be set back to the default ones.
On that part I have to agree with Kindred: since it would be a completely reversible disabling of the signature for a topic, I'd see it as a different mod.

Quote from: npiccoli on July 14, 2011, 01:01:39 AM
I thought it would be much simpler to do with this modification because it has the ability to select "no signature" before posting. Wouldn't that selected option be saved somewhere? If yes, then couldn't you just change the saved information to "no signature?" Perhaps there would be a way where each thread is saved somewhere in the database, with an extra field (i.e. signatures?), then another button could be added. If an administrator clicks that button, all existing signatures will be removed and then the ability to add a signature will always default to "no signature" for that particular thread.

That can't be TOO difficult, can it?
It's not THAT easy do it with this mod and more than that, yes, there is a "no signature" option, but it's post-based (i.e. it's saved alongside each post) while you are describing something topic-based, so is not that logical introduce such a feature in this mod because the two things would be saved in different places. ;)

Quote from: Kindred on July 13, 2011, 11:05:35 PM
That introdcues a whole new functionality to SMF...  In other words, this mod won't do that... And doing that would require some major changes to SMF itself.
It depends on whay you mean with "major".
I think a new column in {db_prefix}topics, a new permission (hide_topic_signatures for example) and (if you are lazy like I am) simply a new button next to "move topic" for example would be enough (all of them are possible using only hooks), plus of course a couple of changes to display.php. While if you want to be super-good you can put also an option in the post page in the additional options area...okay, let me see if I can do it today or tomorrow. :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

npiccoli

Quote from: emanuele on July 14, 2011, 04:10:13 AMIt depends on whay you mean with "major".
I think a new column in {db_prefix}topics, a new permission (hide_topic_signatures for example) and (if you are lazy like I am) simply a new button next to "move topic" for example would be enough (all of them are possible using only hooks), plus of course a couple of changes to display.php. While if you want to be super-good you can put also an option in the post page in the additional options area...okay, let me see if I can do it today or tomorrow. :P

I'm unaware of how Simple Machines is coded (therefore I don't code modifications), but that seems like it could be something which would work well. :)

emanuele

At the end I decided to add the feature to this mod, additionally I also provided an option to hide signatures in an entire board.

So with this mod you can decide to:
1) enable signatures in your forum,
2) select on which board you want to hide/display signatures,
3) hide signatures on a per-topic basis,
4) decide to show (which one)/not show signatures on a per-post/PM basis.

Did I miss something? :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Stigmartyr

Does not work with 2.0.1

--Screenshot Attached--
^see for errors.

emanuele

The errors are due to other mods you have on your forum. ;)

Please have a look at Manual Installation of Mods.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Stigmartyr

Ok thanks - I'll slog through it... =\

nw

#38
Hi there.

First of all, great, fun mod! :)

It installed fine on SMF 2.0. I have a quick question. Is it possible for user to select their signature instead of leaving it as "Random signature"?


Cheers.

emanuele

Each member can select for each post what signature he wants to show. Additionally, in their profile each member can select if he wants it random or not (or no signature at all).

What I still have to do (and I forgot I have it to do) is to give a way to select a default signature.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: