Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: sunilimon on June 28, 2011, 07:57:11 AM

Title: [Free] SMF Prefix Topic
Post by: sunilimon on June 28, 2011, 07:57:11 AM
Version
SMF 2.0

Description
Adds a prefix to topics at selected boards. The prefix must be selected in a select box when posting a new message (before title for example)

Permissions
Only admins can set it up and could manage the permissions, like another mod.

Feature Set
Admins can choose which prefix to display and to whom.
Title: Re: [Free] SMF Prefix Topic
Post by: Jessica. on June 28, 2011, 10:35:26 AM
http://custom.simplemachines.org/mods/index.php?mod=1752


but...it needs to be updated...
Title: Re: [Free] SMF Prefix Topic
Post by: sunilimon on June 28, 2011, 01:58:25 PM
Yes, I saw it but is outdated... anyone could update this?
Title: Re: [Free] SMF Prefix Topic
Post by: sunilimon on June 30, 2011, 03:15:40 AM
Solved, the mod has been updated
Title: Re: [Free] SMF Prefix Topic
Post by: Barlos on July 20, 2011, 03:45:06 AM
I installed, but not working. </Themes/default/Post.template.php> this file still need to be modified.

SMF Topic Prefix Mod - PostPrefix Mod
http://custom.simplemachines.org/mods/index.php?mod=1752

From Manual Install Instructions for SMF ver 2.0

It says as following:
./Themes/default/Post.template.php
find

// Now show the subject box for this post.
echo '
           <tr>
      <td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
        , $txt['subject'], ':
</td>


But, in SMF2, the code is like the following:

// Now show the subject box for this post.
echo '
    <dt>
        <span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
   </dt>

Title: Re: [Free] SMF Prefix Topic
Post by: Nibogo on July 20, 2011, 10:44:26 AM
You can give it a look to the PRO version too: http://www.smfpacks.com/page/sa=atp
Title: Re: [Free] SMF Prefix Topic
Post by: Christian007b on December 17, 2011, 02:51:44 AM
Is there a solution for the problem announced by Barlos? Any ideas or an upgrade of this mod?

Thank you very much :)
Title: Re: [Free] SMF Prefix Topic
Post by: danielwmoore on December 17, 2011, 09:28:51 AM
Quote from: Nibogo on July 20, 2011, 10:44:26 AM
You can give it a look to the PRO version too: http://www.smfpacks.com/page/sa=atp

I'm not sure why anyone would want to pay for a Pro version when the basic version isn't even working yet.

Give the mod an update so they can actually see what it does before they splurge on the pro.  My 2 cents.
Title: Re: [Free] SMF Prefix Topic
Post by: Barlos on December 27, 2011, 02:35:41 AM
I modified <SMF Topic Prefix Mod - PostPrefix Mod 1.2.2 by Nibogo> and got it installed properly and working. I will explain as below. It required couple modifications.

My Server setting:
Apache : 2.2.21
php : 5.3.8
mysql : 5.5.16
SMF : 2.0.2

SMF Topic Prefix Lite Mod 1.2.2 by NIBOGO.
http://custom.simplemachines.org/mods/index.php?mod=1752

First, download the Topic_Prefix_Mod.zip form above link. Then unzip all the files to a directory.
Note: zip file contian several files, so make sure you unzip to a file folder and work within it.

Choese a text editor program to open php files, notepad will do.

Step 1:
open db_prefix.php
find
PRIMARY KEY  (id_prefix)) TYPE=MyISAM $UTFData");
replace with
PRIMARY KEY  (id_prefix)) ENGINE=MyISAM $UTFData");
Save and exit
explain: TYPE is for mysql 4, if your server is running on MySQL 5, then you need to modify it. Otherwise you won't not be able to update mysql structure for prefix mod later.

check the manual edit refer to http://custom.simplemachines.org/mods/index.php?action=parse

Step 2:
open install.xml
find

<file name="$themedir/Post.template.php">
<operation>
<search position="replace"><![CDATA[// Now show the subject box for this post.
echo '
<tr>
    <td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
', $txt['subject'], ':
   </td>]]></search>


replace with

   <file name="$themedir/Post.template.php">
<operation>
<search position="after"><![CDATA[// Now show the subject box for this post.]]></search>

Save and exit

explain: The above code is adds prefix box in front of the topic box. I don't know why the code were needed to be replaced. And, by the original code (from Parse), it will create error if you try to post a topic with or without prefix.

If you need this mod in your own language. Just TopicPrefix.english.php, rename it to your language name, then edit the content with text editor.

You may want to delete unwanted language files.

Compress files to one zip file. Then use package manager to upload and install it.

For admin fourm setting's language. Please edit Modifications.your language.php with the following:

// Topic Prefix Mod
$txt['prefix_admin'] = 'Prefix Admin Panel';
$txt['prefix_add'] = 'Add Prefix';
$txt['prefix_select'] = 'Select Prefix';
$txt['prefix_no'] = 'No Prefix';
$txt['permissionname_prefix_manage'] = 'Manage Topic Prefix';
$txt['permissionhelp_prefix_manage'] = 'Sets if the user can manage the topic prefix.';
$txt['prefix_version'] = 'Topic Prefix Version';
Title: Re: [Free] SMF Prefix Topic
Post by: l2crystin on October 15, 2013, 12:41:09 PM
Quote from: Barlos on December 27, 2011, 02:35:41 AM
I modified <SMF Topic Prefix Mod - PostPrefix Mod 1.2.2 by Nibogo> and got it installed properly and working. I will explain as below. It required couple modifications.

My Server setting:
Apache : 2.2.21
php : 5.3.8
mysql : 5.5.16
SMF : 2.0.2

SMF Topic Prefix Lite Mod 1.2.2 by NIBOGO.
http://custom.simplemachines.org/mods/index.php?mod=1752

First, download the Topic_Prefix_Mod.zip form above link. Then unzip all the files to a directory.
Note: zip file contian several files, so make sure you unzip to a file folder and work within it.

Choese a text editor program to open php files, notepad will do.

Step 1:
open db_prefix.php
find
PRIMARY KEY  (id_prefix)) TYPE=MyISAM $UTFData");
replace with
PRIMARY KEY  (id_prefix)) ENGINE=MyISAM $UTFData");
Save and exit
explain: TYPE is for mysql 4, if your server is running on MySQL 5, then you need to modify it. Otherwise you won't not be able to update mysql structure for prefix mod later.

check the manual edit refer to http://custom.simplemachines.org/mods/index.php?action=parse

Step 2:
open install.xml
find

<file name="$themedir/Post.template.php">
<operation>
<search position="replace"><![CDATA[// Now show the subject box for this post.
echo '
<tr>
    <td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
', $txt['subject'], ':
   </td>]]></search>


replace with

   <file name="$themedir/Post.template.php">
<operation>
<search position="after"><![CDATA[// Now show the subject box for this post.]]></search>

Save and exit

explain: The above code is adds prefix box in front of the topic box. I don't know why the code were needed to be replaced. And, by the original code (from Parse), it will create error if you try to post a topic with or without prefix.

If you need this mod in your own language. Just TopicPrefix.english.php, rename it to your language name, then edit the content with text editor.

You may want to delete unwanted language files.

Compress files to one zip file. Then use package manager to upload and install it.

For admin fourm setting's language. Please edit Modifications.your language.php with the following:

// Topic Prefix Mod
$txt['prefix_admin'] = 'Prefix Admin Panel';
$txt['prefix_add'] = 'Add Prefix';
$txt['prefix_select'] = 'Select Prefix';
$txt['prefix_no'] = 'No Prefix';
$txt['permissionname_prefix_manage'] = 'Manage Topic Prefix';
$txt['permissionhelp_prefix_manage'] = 'Sets if the user can manage the topic prefix.';
$txt['prefix_version'] = 'Topic Prefix Version';

thanks to epsaxna gia version 2.0.5
Title: Re: [Free] SMF Prefix Topic
Post by: guty507 on December 04, 2013, 05:04:28 PM
Hello i have a problem , when I install the mod tells me: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 213113 bytes) in / home/u741811931/public_html/Sources/Subs-Package.php on line 2072

it is? is the hosting?
Title: Re: [Free] SMF Prefix Topic
Post by: Arantor on December 04, 2013, 05:05:50 PM
Which host is it? But yes it probably is the hosting.
Title: Re: [Free] SMF Prefix Topic
Post by: guty507 on December 04, 2013, 05:09:14 PM
Quote from: Arantor Beeblebrox the First on December 04, 2013, 05:05:50 PM
Which host is it? But yes it probably is the hosting.

Is Hostinger.es , its free
Title: Re: [Free] SMF Prefix Topic
Post by: Arantor on December 04, 2013, 05:10:34 PM
So yes, the hosting is the problem then.
Title: Re: [Free] SMF Prefix Topic
Post by: guty507 on December 06, 2013, 11:59:15 PM
i install the mod but i can t see the admin configuration , help pliss !!!!
Title: Re: [Free] SMF Prefix Topic
Post by: Ricky. on December 07, 2013, 03:00:19 AM
You should use MOD's support topic:
http://www.simplemachines.org/community/index.php?topic=305579.0