News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Advanced Signature

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

Previous topic - Next topic

Skaty

also i have logs like this:

8: Undefined index: 499 (also 1694,277,2165)    .......    /Sources/Subs-AdvancedSignature.php
Line: 97


do you have any idea for fix ?

emanuele

The code I wrote is quite ugly... ::)

I think I have an idea, but it doesn't make sense with the old code... ::)

Simple fix should be to replace:
return count($context['user_avail_signatures'][$member]);
with:
return isset($context['user_avail_signatures'][$member]) ? count($context['user_avail_signatures'][$member]) : 0;
doesn't make sense, but let try.


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.

Skaty

:)

didn't work. but i can give more clue for problem. it's mostly gave it when pm is received or send.

and it is point from this -->> index.php?pretty;action=pm   

to this file's --> Sources/PersonalMessage.php   

line -->  (1058) if($memberContext[$message['id_member_from']]['random_signature']==-2){     
and     (1060)    elseif($memberContext[$message['id_member_from']]['random_signature']==-1 && $message['signature_id']!=-2){

emanuele

Replace the block:
if($memberContext[$message['id_member']]['random_signature']==-2){
$message['signature_id']=-2;}
elseif($memberContext[$message['id_member']]['random_signature']==-1 && $message['signature_id']!=-2){
$message['signature_id']=-1;}

with:
if(!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature']==-2){
$message['signature_id']=-2;}
elseif(!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature']==-1 && $message['signature_id']!=-2){
$message['signature_id']=-1;}

Should work at least for a while...


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.

Skaty

Finally installed the beta version of mod. And it is working correctly. Thank you.

Skaty

Except, some signatures of some members don't appear in some topics :D

Skaty

i think i'm gonna uninstall it again :D

Cat McFarlane

Hiya :-)

Have been told to post here, as Subs-AdvancedSignature.php, although the mod isn't installed or on the system anymore is throwing up an error ...

8: Undefined index: hide_sign
File: /home/dsdetllb/public_html/Themes/freshlooks/index.template.php
Line: 614

about various topics/messages.

I noticed this error began after Buddy Page error showed, but also upgraded Aeva Media around the same time ... I see one line of text at the top of the site, I believe when someone is looking at their Buddy Page. Had posted, but it got lost/was really busy. No direct editing of subs.php done recently, but had the Buddy Page error and also installed 'related topics', 'simple ads', 'enhancements to purge inactive members' (which doesn't really need to be there now), plus I upgraded Aeva Media to 2.10).

Found a hide-sign in Subs-AdvancedSignature.php, but don't know what to replace it with. Or can I just removed the php file entirely, as the mod isn't there any more?

Thanks, Cat

Kindred

Well, your error suggests that the missing index is being called in index.template.php

this means that there is some left over code - if you uninstalled the advanced signature mod, it probably thew some errors during the uninstall but you ignored them and did it anyway - leading to some bits of code which were not correctly removed.


If you have code/text at the top of the screen on a page, that indicates that you have bade code somewhere (usually in one of the language files)
Сл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."

Cat McFarlane

Quote from: Kindred on September 25, 2013, 02:36:44 PM
Well, your error suggests that the missing index is being called in index.template.php

this means that there is some left over code - if you uninstalled the advanced signature mod, it probably thew some errors during the uninstall but you ignored them and did it anyway - leading to some bits of code which were not correctly removed.


If you have code/text at the top of the screen on a page, that indicates that you have bade code somewhere (usually in one of the language files)

Thanks Kindred.  :) Sorry, I have no idea what code to change in files, unless I post them individually to ask.

NekoJonez

I get this error when somebody sends a pm:

http://www.arpegi.be/index.php?action=pm;f=inbox;l=-1;done=sent
8: Undefined index: random_signature
/customers/b/f/a/arpegi.be/httpd.www/Sources/PersonalMessage.php
Line: 1022


Or on line 1024.

What can I do about this?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

NekoJonez

Most of the times, when I put three different images for signatures, one of them goes duplicate.

So, image that I have image X in sig 1
image Y in sig 2
and image Z in sig 3.

In the forum posting, it will switch between image X,Y and Z. But on my profile, Image Y is displayed on sig 2 and 3 .
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

emanuele

Code (find) Select

if ($memberContext[$message['id_member']]['random_signature'] == -2)
$message['signature_id'] = -2;
elseif ($memberContext[$message['id_member']]['random_signature'] == -1 && $message['signature_id'] != -2)
$message['signature_id'] = -1;

Code (replace with) Select

if (!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature'] == -2)
$message['signature_id'] = -2;
elseif (!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature'] == -1 && $message['signature_id'] != -2)
$message['signature_id'] = -1;


Quote from: NekoJonez on February 11, 2014, 10:18:54 AM
In the forum posting, it will switch between image X,Y and Z. But on my profile, Image Y is displayed on sig 2 and 3 .
Are you sure you don't have "random signature" set somewhere?


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.

kamili34

Polish translation

$txt['random_signature'] = 'Użyj przypadkowej sygnatury';
$txt['signature'] = isset($txt['signature']) ? $txt['signature'] : 'Sygnatura';
$txt['signature_numb'] = 'Sygnatura %1$s';
$txt['nosignature'] = 'Brak sygnatury';
$txt['randomsignature'] = 'Przypadkowa sygnatura';
$txt['restoresignatures'] = 'Resetuj do pojedyńczej sygnatury dla użytkownika';
$txt['choose_signature'] = 'Wybierz, którą opcję sygnatury chcesz użyć';
$txt['normal_signature'] = 'Normalna sygnatura';
$txt['signatures_still_missing'] = 'Przepraszamy nadal s&#261; [MISSING_SIGNATURES] sygnatury do zatwierdzenia.<br />Akcja zosta&#322;a przerwana w celu odci&#261;&#380;enia serwera.';
$txt['signature_continue'] = 'Kontynuuj';
$txt['signatures_restored'] = 'Wszystkich u&#380;ytkownik&#243;w sygnatury zosta&#322;y ustawione do pojedy&#324;czej';
$txt['default_signature'] = 'Standardowa sygnatura (zostanie ustawiona je&#347;li u&#380;ytkownik nie ma swojej ustawionej).<div class="smalltext">Pomoc na pliku zast&#281;pczym. BBCode jest wspierane.</div>';
$txt['max_numberofSignatures'] = 'Maksymalne dozwolone sygnatury dla u&#380;ytkownika<div class="smalltext">(nie mniej ni&#380; 1)<br />Prosz&#281; u&#380;y&#263; opcji <a href="' . $boardurl . '/index.php?action=admin;area=maintain;sa=members">Strona zarz&#261;dzania u&#380;ytkownika</a> aby zresetowa&#263; ustawienie do 1 sygnatury przed odinstalowaniem.</div>';
$txt['permissionname_hide_topic_signatures'] = 'Ukryj sygnatury u&#380;ytkownik&#243;w w tematach';
$txt['hide_sign'] = 'Ukryj sygnatury';
$txt['unhide_sign'] = 'Poka&#380; sygnatury';
$txt['modlog_ac_hide_sign'] = 'Ukryj sygnatury &quot;{topic}&quot;';
$txt['modlog_ac_unhide_sign'] = 'Odkryj sygnatury &quot;{topic}&quot;';
$txt['disable_log_hide_signature'] = 'Wy&#322;&#261;cz logowanie dla ukrytch syngatur';
$txt['mboards_disabled_signatures'] = 'Wy&#322;&#261;cz sygnatury';
$txt['mboards_disabled_signatures_desc'] = 'Nie pokazuj sygnatur u&#380;ytkownik&#243; dla tych dzia&#322;&#243;w';

NekoJonez

Quote from: emanuele on February 12, 2014, 03:14:52 PM
Code (find) Select

if ($memberContext[$message['id_member']]['random_signature'] == -2)
$message['signature_id'] = -2;
elseif ($memberContext[$message['id_member']]['random_signature'] == -1 && $message['signature_id'] != -2)
$message['signature_id'] = -1;

Code (replace with) Select

if (!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature'] == -2)
$message['signature_id'] = -2;
elseif (!empty($memberContext[$message['id_member']]['random_signature']) && $memberContext[$message['id_member']]['random_signature'] == -1 && $message['signature_id'] != -2)
$message['signature_id'] = -1;


Quote from: NekoJonez on February 11, 2014, 10:18:54 AM
In the forum posting, it will switch between image X,Y and Z. But on my profile, Image Y is displayed on sig 2 and 3 .
Are you sure you don't have "random signature" set somewhere?

I'll apply your fix now. To your question, yes, I have random signature set, but it shouldn't randomize it in the profile display?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

NekoJonez

http://www.arpegi.be/index.php?action=pm;pmid=9276;kstart;f=inbox;start=1000;sort=date;
8: Undefined index: id_memberApply Filter: Only show the errors from this file File: /customers/b/f/a/arpegi.be/httpd.www/Sources/PersonalMessage.php
Line: 1024


This happens if I apply the code change by just opening my pm's.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

emanuele

@kamili34 Thanks! ;D

Quote from: NekoJonez on February 13, 2014, 08:21:17 AM
I'll apply your fix now. To your question, yes, I have random signature set, but it shouldn't randomize it in the profile display?
Good question... no idea... LOL
I seem to remember in profile should show all of them, but I'm not sure.

Quote from: NekoJonez on February 13, 2014, 08:45:55 AM
This happens if I apply the code change by just opening my pm's.
Right, right PMs not display...
In the changed code, replace id_member with id_member_from


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.

NekoJonez

Quote from: emanuele on February 14, 2014, 05:46:04 PM
@kamili34 Thanks! ;D

Quote from: NekoJonez on February 13, 2014, 08:21:17 AM
I'll apply your fix now. To your question, yes, I have random signature set, but it shouldn't randomize it in the profile display?
Good question... no idea... LOL
I seem to remember in profile should show all of them, but I'm not sure.

Quote from: NekoJonez on February 13, 2014, 08:45:55 AM
This happens if I apply the code change by just opening my pm's.
Right, right PMs not display...
In the changed code, replace id_member with id_member_from

Alright. So, how to fix that issue with the profile view?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

NekoJonez

Here is another bug.

If you load the profile editor, it always gives max characters.

Max characters: 600; characters remaining: 600 => Even when you have stuff inside the boxes.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

rower

How to ad admin akcept sygnature mode? And, how off sugnature to member group?

Thanks for reply.

Advertisement: