News:

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

Main Menu

SMF Post Prefix

Started by Diego Andrés, May 11, 2015, 10:37:35 PM

Previous topic - Next topic

Dreadaxe


Dreadaxe

Part of problem solve.



with theme AlphaCentury I have a show problem

landyvlad

Installed this today.  Works perfectly. Bloody fantastic ! Top job !
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Coyote Keith

Quote from: Diego Andrés on June 02, 2016, 12:33:29 AM
Quote from: Coyote Keith on May 27, 2016, 07:21:42 PM
Just installed this mod on my site 2.0.11 with no errors or issues. The mod works fine but I noticed I'm now getting a logged error every time a search is made. The error is in the attach pic

The line of code in question is

'prefix' => PostPrefix::formatPrefix($message['id_prefix']),

Appreciate any help.

I will take a look

Did you check on this yet? I just did a fresh forum install today 2/0/13 and with no other mods, this mod causes errors on every search. If I remove the mod, the errors go away.

Here is an error from the log.

     
8: Undefined index: id_prefix
Apply Filter: Only show the errors from this file
File: /home/xxxxx/public_html/xxxx.com/Sources/Search.php
Line: 2013

This does not happen when using the home page search box but always happens when using the advanced search from the main menu (where the Prefix drop down is)

Love the mod but can't have all the errors on this install. Thanks

AnilK

Same here, great mod but I'm getting lots of errors:

8: Undefined index: id_prefix
File: /home/******/public_html/Sources/Search.php
Line: 2018

8: Undefined index: id_prefix
File: /home/******/public_html/Sources/Post.php
Line: 789

GL700Wing

Quote8: Undefined index: id_prefix
Apply Filter: Only show the errors from this file
File: /home/xxxxx/public_html/xxxx.com/Sources/Search.php
The fix for this issue is as follows:

In the file ./Sources/Search.php
Find:
t.id_topic, t.is_sticky, t.locked, t.id_poll, t.num_replies, t.num_views,

Replace with
t.id_topic, t.is_sticky, t.locked, t.id_poll, t.num_replies, t.num_views, t.id_prefix,

The search now works without throwing errors but the PostPrefix bit doesn't work in the search (ie, it doesn't actually search using the prefix if one is specified) - someone else can fix that!

Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on March 19, 2017, 06:35:28 AM
The search now works without throwing errors but the PostPrefix bit doesn't work in the search (ie, it doesn't actually search using the prefix if one is specified) - someone else can fix that!
My bad - the Postrefix search does work but it doesn't show the PostPrefix as part of the topic title.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

phoxim

very cool mod, it rans perfectly under 1.1.x.
we upgraded to SMF 2.0.13 and now we are facing some problems with the mod:

installation was fine.
while adding prefixes to a specified board the mod starts setting these prefixes to many threads im various boards randomly.

any suggestions please!

wolfgang
German Science Fiction Modeling Forum with SMF 2.0.18

landyvlad

I've not had that issue at all.

As you've upgraded SMF versions, I suggest you uninstall, then reinstall the mod.
(It's likely, or even certain, the mod has been updated since you originally installed it)
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

phoxim

Quote from: landyvlad on April 12, 2017, 05:53:04 AM
I've not had that issue at all.

As you've upgraded SMF versions, I suggest you uninstall, then reinstall the mod.
(It's likely, or even certain, the mod has been updated since you originally installed it)

that is exactly what I did!
w.
German Science Fiction Modeling Forum with SMF 2.0.18

Diego Andrés

I'm sorry, I haven't been around for a while, can you please update me on the issue you were having? Or did you fixed it already?
And was it a mod failure? So I can update it.
Thanks :)

SMF Tricks - Free & Premium Responsive Themes for SMF.

edi1967

very nice mod but i want ask this:

Is possible have Prefix instead of begin of title at the end ?

i means instead of this:

[PREFIX] Topic Title

have this

Topic Title [PREFIX]

Thx for your help

Arantor

Then it's not really a prefix, is it? It's also more likely to not be noticed by users if done that way.

AnilK

Quote from: Diego Andrés on April 26, 2017, 08:25:58 AM
I'm sorry, I haven't been around for a while, can you please update me on the issue you were having? Or did you fixed it already?
And was it a mod failure? So I can update it.
Thanks :)
Hi, I don't know if it is a mod failure or not, but here is the error log:

8: Undefined index: id_prefix
File: /home/******/public_html/Sources/Post.php
Line: 789 ( $context['id_prefix'] = $row['id_prefix']; )

Jackmoon

Hello, how can I make the background color that I select or the box is smaller uses reseller and the size is too with browser F12 and how to do and edit but I do not know where I can do it because I do not find any CSS file, help?

GL700Wing

Fixed a bug that occurred when using 'Search in topic subjects only' (mostly I was getting an 'Undefined index: prefix' error in Search.php but occasionally I was also getting a database error relating to SQL syntax in Search.php).

In ./Sources/Search.php
Find:
$subject_query['where'][] = 't.id_prefix ' . $search_params['prefix'];
Replace with:
$subject_query['where'][] = 't.id_prefix = ' . $search_params['prefix'];
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Diego Andrés

Quote from: GL700Wing on June 12, 2017, 08:57:11 PM
Fixed a bug that occurred when using 'Search in topic subjects only' (mostly I was getting an 'Undefined index: prefix' error in Search.php but occasionally I was also getting a database error relating to SQL syntax in Search.php).

In ./Sources/Search.php
Find:
$subject_query['where'][] = 't.id_prefix ' . $search_params['prefix'];
Replace with:
$subject_query['where'][] = 't.id_prefix = ' . $search_params['prefix'];

Thanks! I missed that one I guess, will update it shortly

SMF Tricks - Free & Premium Responsive Themes for SMF.

confuseamuse

I can't see anywhere in the mod files how I'd change the CSS appearance of the prefixes. Need some help with eyesight.

d3vcho

What would you like to change exactly?
"Greeting Death as an old friend, they departed this life as equals"

confuseamuse

I realised that you can CSS the changes, you just need to use '!important' override the inline CSS.

Advertisement: