PostPrefix

Started by JayBachatero, June 28, 2006, 10:26:20 AM

Previous topic - Next topic

Jade Elizabeth

That's a bug :(. I don't know how to fix it, but it is not your error.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

sorosh1

#161
I hope that this mod is still supported

First i want to say that i am really really glad with this mod! 
I almost wanted to pay for this mod, so someone could make it for me

Install was succesfull (is use SMF 1.1.4 )
I have just one quastion:

How can i make posters force to choose a Prefix. I mean by that, that they must choose one prefix otherwise the posters cant post.

I hope you can help me,

best regards,

Sorosh

InsaneMustang

Does anyone know where I can look so that I can change the color of the prefix and also make it to where the prefix isn't part of the link to that topic?

gemigene

Wonder if this could work on 1.15 without a hitch, I'd love to have this option available to my users.

Gene
"Religion is metaphysical statism. I will be ruled by no man on earth, nor by any god in heaven"

Enders

Quote from: qubbah on November 29, 2007, 12:41:39 PM
how can i set it up only for certain board which i choose?

Yes, I would love this feature too. Btw, it works for 1.1.5

TheEdgeGER

Is it possible to create a prefix just for one board? For example I have a motorsport-forum and for the nascar board i want to create three prefixes: Sprint Cup Series, Nationwide Series, Craftsman Truck Series.

On the "Other Motorsport"-board i want to create the following prefixes: Formula 1, IRL, WTCC, WRC and so on.

I think the list will get a little bit too long. Thanks for your answers!

bfeo

Any method to make the prefix a different color, so that it stands out from the topic title?

bfeo


bfeo


bfeo

I don't need different colors from each, just something to separate the prefix from subject title by color.


Heck, even to make it not a link would change color.  I have a dull blue color for my boards, and if I could set the prefix to be plain none linked text in front of title, then it would show as a diff color.

bfeo


bfeo

...  I don't mean to spam or anything... but...

rickways

Hello,

I try this mod with pleasure, but when i'm going in "message parameters", and when i'm choosing to Select the boards to show Post Prefix options on, it doesn't work
The préfix is in ALL Boards !!!!

Please help

DrkSnpr14

Just installed on 1.1.6, works perfectly with default and custom themes
[nofollow]

Don Pepito

I have 2 questions....
How can i make prefix without links. That there is just prefix, but prefix shouldnt be linked, at all...
And how can i change color of prefix...?/

zeridon

Any chance this be ported to 2.x

Nibogo

#176
With this you can fix the bug of the prefix are showed in all the post , so with this only the first post can show the prefix (Excuse me for the english :P)

Edit the Post.template.php:

Search For:

if (allowedTo('post_prefix'))

Replace with:

if ((allowedTo('post_prefix')) && $context['is_first_post'])

Works great ;)

Boby_

#177
Great mod but rather unfinished.  :D

I've made some modifications to make the following things:
1. To choose a single board for the mod (it works on all or none now)
2. To make it mandatory to choose a prefix.

Before starting with the following modification please make BACKUPS of all the files you are going to edit!!! If you chose not to do so please don't blame me. :-)

I also used the change suggested by NIBOGO to get rid of prefixes on all the answers:

Edit the Post.template.php:
Search For:
if (allowedTo('post_prefix'))
Replace with:
if ((allowedTo('post_prefix')) && $context['is_first_post'])


Now my modifications:

1. Take a look in your MySQL database and find out the ID of the board you want to be able to post a prefixes in.
You can also find out your board ID by entering the board and taking a short look to the address barr:

http://yourforumURL/forum/index.php?board=8.0

You can see board=8.0 (this was my case). This is your board ID.

Then find  Post.template.php in your theme folder and open it.
Search for:

if (allowedTo('post_prefix'))

or if you applied NIBOGO's modification for

if ((allowedTo('post_prefix')) && $context['is_first_post'])


Replace with:

if ((allowedTo('post_prefix')) && $context['is_first_post'] && $context['current_board'] == 8)

At the end before the final bracket replace the 8 with the board ID of your board.

This will show the Prefix only on the desired board.
Now the tricky part - make it mandatory. You need to change two files to make it - the language file with the errors (Errors.english.php by default) which is located in language folder of your theme folder and Post.php which is located in Sources folder of the forum.

In Errors.english.php go to the end and add a line before ?> which says something like:

$txt['error_no_prefix'] = 'No prefix chosen!';


Then in Post.php do the following:
Search for:

if (empty($context['post_error']))
{

Add BEFORE it:

if (($func['htmltrim']($_REQUEST['post_prefix']) == '') && ($context['current_board'] == 8))
$context['post_error']['no_prefix'] = true;

Here again be careful - you have to change the 8 at the end of the first row with the ID of your board.

Now your prefixes will be mandatory and will be shown just on the board you've chosen. I use this for announcements board in my forum to determine the type of the announcement.
It is quite rough with this manual board choice but it works. You can also make the modifications to work for 2, 3 or more boars if you wish.
I hope it helps! :)





mkress

is it possible with this modification to have different prefixes for each board?

mkress

I have installed this mod - the mod has a good base, but it is very sad, that it is not possible to have different prefixes for different boards...

Advertisement: