vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Thread Prefixes (https://vborg.vbsupport.ru/showthread.php?t=99925)

Mystics 11-01-2005 10:00 PM

Thread Prefixes
 
Thread Prefixes

Version: 1.5.5
vBulletin Version: 3.5.4
Developer: Michael (Mystics) Koenig (www.vbulletin-germany.com)
Modification-Language: English & German & French (thanks to ReadWrite - Note: Readme has not yet been translated to french.)
Install-difficulty: Medium
File-edits: 5
Template-edits: 10


Brief Description of the Modification

This modification allows your users to choose a thread prefix for each thread. To do this you are able to select an appropriate prefix from a list beside the title while posting a new thread - for example 'Help', 'Problem', 'Search' etc.

This prefix will be displayed in front of the thread title. The result will be for example:
Problem - I can't find this setting

Problem is the thread prefix, I can't find this setting is the title of the thread.

The prefixes displayed in this list may be defined by a moderator for each of his moderated forums (Forum Tools -> Manage Thread Prefixes); of course an administrator and a super moderator is allowed to do this for every forum.


Features
  • Moderators are able to create own prefixes for each of their moderated forums.
    (Forum -> Forum Tools -> Manage Thread Prefixes -> threadprefix.php)
  • Display of the prefixes on forum display, search results, subscribed threads and within the thread itself.
  • It is possible to change the prefix with editing the first post of a thread or with the thread tools available for moderators at any time.
Settings in Admin CP
  • Maximum prefixes per forum
  • Thread Prefix required: Users have to select a thread prefix for their threads. You can select this globally for all forums or on a per forum basis.
  • Default Thread Prefixes: You may set default prefixes which will either be shown only in forums without own prefixes or be shown in addition to existing prefixes
  • Show Thread Prefixes in extra column or in front of the thread title in the same column
  • Alignment of the prefixes (if 'Show in extra column' is enabled): Align left, align right, center
  • Show Prefix in 'Last Post' column
  • Prefix HTML Markup: Specify an HTML tag with which to display the prefixes (bold, italic, red etc.)
  • Allow Thread Prefix search: If enabled, the prefixes of all forums the user has access to will be grouped in a list and displayed in the search engine.
  • Per Forum:
    • Allow Thread Prefixes in this Forum
    • Thread Prefix Required in this Forum.
Screenshots

See attachments.


Version-History

1.5.5 (2006-04-09 - 03:00 pm CET)
  • Fixed database error within the search engine.
    (if prefix was selected and results were shown as posts)
  • Just import the updated xml file.
1.5.4 (2006-03-20 - 01:30 am CET)
  • Fixed small error within the search engine.
  • Just import the updated xml file.
1.5.3 (2006-03-19 - 03:30 pm CET)
  • Changes in includes/class_dm_threadpost.php for vB 3.5.4
  • Changes in includes/functions_threadprefix.php for vB 3.5.4
  • New: Search for prefixes only is now possible (without keywords)
  • New: Prefixes are displayed in "Similar Threads"
  • New: Separator between prefix and thread title within threads/emails may now be defined in your Admin Control Panel (used to be always " - ").
  • New: Save Thread Prefix in Search Preferences
1.5.2 (2005-11-03 - 07:30 pm CET)
  • Missing phrase: updateprefixes
  • Fixed small error in /threadprefix.php
1.5.1 (2005-11-02 - 09:30 pm CET)
  • First version for vBulletin 3.5.1
1.5.0 (2005-11-02 - 09:30 pm CET)
  • First version for vBulletin 3.5.0 (only one file edit more because of a missing hook)
Installation
  1. Upload all files from the upload directory to your vBulletin directory on your server.

    Overview of the files and corresponding directories:
    • /threadprefix.php
    • /admincp/prefixinstall.php
    • /admincp/prefixinstall_text.php
    • /includes/functions_threadprefix.php

  2. Import the file "product-threadprefix_english.xml" with 'Manage Products':
    Admin Control Panel -> Plugin System -> Manage Products ->
    [Add/Import Product] -> Select file -> Import

  3. Open this file with your browser:
    http://www.yourdomain.com/forum/admincp/prefixinstall.php

  4. Log in as administrator and follow the instructions
Time needed for installation: approx. 30 min.
Tested for version: 3.5.0 (and above).

Note: If you have used the Thread Category / Prefix Hack in vBulletin 3.0.x, don't worry: all existing prefixes will be imported during the installation. You just have to re-do your thread prefix settings in your vBulletin Options.

Update Product
  1. Upload all files from the upload directory to your vBulletin directory on your server.

    Overview of the files and corresponding directories:
    • /threadprefix.php
    • /admincp/prefixinstall.php
    • /admincp/prefixinstall_text.php
    • /includes/functions_threadprefix.php

  2. Import the file "product-threadprefix_english.xml" with 'Manage Products':
    Admin Control Panel -> Plugin System -> Manage Products ->
    [Add/Import Product] -> Select file -> Import

    You have to select 'Allow Overwrite' -> 'Yes' before clicking on Import!

  3. Open this file with your browser:
    http://www.yourdomain.com/forum/admincp/prefixinstall.php

  4. Log in, select the version you want to update from (at Step 2 -> 'Update Modification') and follow the instructions.
Short overview of the needed modifications

1. Files that need to be edited:
  • /showthread.php (Display prefix in 'Similar Threads')
  • /clientscript/vbulletin_textedit.js (JavaScript error message if no prefix was selected)
  • /includes/class_dm_threadpost.php (Prefix within emails to moderators)
  • /includes/functions_databuild.php (Update prefix in column 'Last Post' for mod functions)
  • /includes/functions_online.php (Display prefix in 'Who's online')

    It is your decision if you need the above functions or if you decide do use the product without file modifications!
    You don't have to do the file modifications as the product will work even though without them!
2. New files:
  • /threadprefix.php
  • /includes/functions_threadprefix.php
3. Templates that need to be edited:
  • editpost
  • FORUMDISPLAY
  • forumdisplay_announcement
  • newthread
  • search_forums
  • search_results
  • SUBSCRIBE
  • threadadmin_editthread
  • threadbit
  • threadbit_deleted
4. New templates:
  • threadprefix_listbit
  • threadprefix_modify
5. New phrases:
  • Too many to list them all - they will be created automatically while importing the xml file
Final words

If the modification doesn't work correct after installation, please verify all modifications you have made within the files and the templates. Be sure you have uploaded all edited and new files.

The modification was tested extensive and will function properly if installed correct.

Thanks to ReadWrite for his french translation.

Special Thanks to Andreas for his help with the hooks.

Have fun with the modification!

Please click Install if you have installed it :)

Mike

DrewM 11-02-2005 07:34 PM

Thank you clicked install

RMS-Chef 11-02-2005 07:45 PM

Great addon. I am currently staying away from file edits but I will definitely click install to keep an eye on this in the off chase you can eliminate the file edits in the future. Thanks again.

Mystics 11-02-2005 07:49 PM

Quote:

Originally Posted by RMS-Chef
Great addon. I am currently staying away from file edits but I will definitely click install to keep an eye on this in the off chase you can eliminate the file edits in the future. Thanks again.

You will always have to edit the /clientscript/vbulletin_textedit.js file :)

But ok, that's just for the JS error message if you didn't select a prefix - so it's not really necessary.

gael11 11-02-2005 07:49 PM

Very usefull mod !!! Thanks very much !

Cyricx 11-02-2005 08:05 PM

Awesome!!!! So happy to see this ported, thanks so much for your work!! :)

gael11 11-02-2005 08:22 PM

I think there is a problem while editing files at step 4.
I have to edit the file called editpost.
I have to search for:
Code:

<form name="vbform" action="editpost.php" method="post"<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
but impossible to find it :(

Mystics 11-02-2005 08:25 PM

Quote:

Originally Posted by gael11
I think there is a problem while editing files at step 4.

This code is in the template editpost. All modifications in step 4 are template modifications.

Snake 11-02-2005 08:29 PM

Oh thanks for the hack!

gael11 11-02-2005 08:36 PM

Quote:

Originally Posted by Mystics
This code is in the template editpost. All modifications in step 4 are template modifications.

Ooops excuse me, I'm tired lol

michaelbenson 11-02-2005 08:37 PM

Excellent, been waiting so long for this
/me installs.

nexialys 11-02-2005 08:43 PM

/me think to remember to note to tag this thread and hug Mike for this update!

DrewM 11-02-2005 08:48 PM

I have one problem the prefix isn't showing on the forum but it will in search results?

Is there any thing I should do?

Mystics 11-02-2005 09:04 PM

Quote:

Originally Posted by Larrysw
I have one problem the prefix isn't showing on the forum but it will in search results?

Hm, are all plugins active? Did you make all modifications correct? Did you select the correct style?

TTG 11-02-2005 09:06 PM

Inporting product on 3.5.1 produces this error :-

Code:

Fatal error: Call to undefined function: fetchtableinfo() in /usr/home/techguys/public_html/forum/admincp/apm_product.php on line 1467

Mystics 11-02-2005 09:08 PM

Quote:

Originally Posted by TTG
Inporting product on 3.5.1 produces this error

Try disabling the "APM Product". You can re-enable it after importing the threadprefix file.

DrewM 11-02-2005 09:19 PM

Quote:

Hm, are all plugins active? Did you make all modifications correct? Did you select the correct style?
I have the right style,plugins active, and i did ever thing in the install.

Mystics 11-02-2005 09:24 PM

Quote:

Originally Posted by Larrysw
I have the right style,plugins active, and i did ever thing in the install.

Send me an admin account via pm and I will take a look tomorrow.

marc_t 11-02-2005 09:41 PM

Hi,

nice to see that you are thaaaaat damn fast and already have this for 3.5.0. I just want to know before installing:

Do I have to uninstall the hack I installed at 3.0.7? Or can I just install this over the old installation (as my database with already made prefixes shouldbe kept for the new plugin)

Thanks alot,
marc

PS: Its always better to first read and than ask - already got my answer that it is possible to upgrade. Any problems known?

TTG 11-02-2005 10:03 PM

Quote:

Originally Posted by Mystics
Try disabling the "APM Product". You can re-enable it after importing the threadprefix file.


All edits done .. re-enabled product.

Additional blank check box in forum tools dropdown .. using it produces sql error.
No options in admincp .. no additional options for editing forums.

marc_t 11-02-2005 10:06 PM

Another question:

Quote:

Log in as administrator and select the version you want to update from (at Step 2 -> 'Update Product') and follow the instructions.
I dont have this point. Anything I made wrong? Followed the steps until this.

ThePimp 11-02-2005 10:41 PM

I'll install when it doesn't have any edits.

FleaBag 11-02-2005 10:48 PM

Try reading previous posts pimp. ;)

Great hack, I never installed this on 3.0.x because of all the edits, this is a fantastic port - thanks! :)

ThePimp 11-02-2005 11:46 PM

Quote:

Originally Posted by FleaBag
Try reading previous posts pimp. ;)

Great hack, I never installed this on 3.0.x because of all the edits, this is a fantastic port - thanks! :)

I'm too lazy. :) lol

It does look like a good addition though. I tried install, but the instructions didn't work for me, as I have some modified templates and didn't feel like spending a couple hours reworking my templates to get it to work.

Daniel 11-03-2005 12:29 AM

I can't find

Code:

<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">
in my threadbit ...

Omega Prime 11-03-2005 01:55 AM

Yes!! I've been waiting for this hack to be ported over since I upgraded to 3.5!! Now I feel more complete at my forum (and I was able to keep my previously prefix'd threads, too) :D

[high]* Omega Prime clicks install[/high]

Markco 11-03-2005 06:49 AM

I have an error by creating the prefixes
Code:

Warning: main(/includes/adminfunctions.php) [function.main]: failed to open stream: No such file or directory in /threadprefix.php on line 200

Fatal error: main() [function.require]: Failed opening required '/includes/adminfunctions.php' (include_path='.:/usr/local/lib/php5') in /threadprefix.php on line 200


Dadoo 11-03-2005 06:52 AM

Hello !!

great hack i think..

but i found an error on threadprefix.php file, line 200

(so, in reality i'd this error in vbulletin when i attempt to add prefixes, and once time "." behind /includes is deleted, all works !)

PHP Code:

 require_once(DIR './includes/adminfunctions.php'); 


ANd second error, when i validate news prefixes, i have this error message :

Could not find phrase 'updateprefixes'.


Can you help me..?

Thanks you !

gael11 11-03-2005 07:16 AM

I don't know if I do a mistake but look this:
Under Firefox
http://www.image-dream.com/up/mini/1...-ff_screen.jpg

And under Internet Explorer:
http://www.image-dream.com/up/mini/1...-ie_screen.jpg

I will try to check my templates :ermm:

EDIT: oops, finally I have deleted ">

Odysseus 11-03-2005 12:48 PM

Ah, finally. :)
Mystics, thanks for sharing!

thalamus 11-03-2005 01:09 PM

Brilliant modification, had it on 3.0.x now got it for 3.5.0 and about to install...

Just a few questions if I may...

a) Is it very involved to be able to add a colour scheme to the <td> for each category/prefix that's set up (for instance, 'Problem' is black font on green, 'Urgent' is white font on red etc.)?
b) How difficult would it be for subsequent posters to be able to change the prefix with their new posts rather than having a mod or admin to go in and keep editing the first post of the thread?

Mystics 11-03-2005 04:29 PM

Quote:

Originally Posted by marc_t
I dont have this point. Anything I made wrong? Followed the steps until this.

That's only for future updates (more template edits etc.). 1.5.0/1.5.1 are the first versions for vBulletin 3.5, so there is nothing to update yet. vB 3.0.x Thread Prefixes will be imported automatically...just follow the install instructions.
Quote:

Originally Posted by Daniel
I can't find in my threadbit ...

Revert to Original...it's there.
Quote:

Originally Posted by finereader
but i found an error on threadprefix.php file, line 200

ANd second error, when i validate news prefixes, i have this error message :

@Markco & @finereader

Update to 1.5.2 :)

@thalamus

Sorry, both is not possible in this version.
Quote:

Originally Posted by TTG
All edits done .. re-enabled product.

Additional blank check box in forum tools dropdown .. using it produces sql error.
No options in admincp .. no additional options for editing forums.

Works fine for me. It seems you even can't import the product successfully, I don't know why.

marc_t 11-03-2005 06:19 PM

Thanks. Will check this.

jluerken 11-03-2005 06:39 PM

Hi Mystics,

I've installed version 1.52 and as far as I could test it everything works fine.
Thanks for this great hack.

One additional question.
I installed this hack in english but I also want to have the german phrases.

How can I install the english AND german phrases to have both?

Mystics 11-03-2005 07:28 PM

Quote:

Originally Posted by jluerken
How can I install the english AND german phrases to have both?

I don't think this can be done automatically. The product system doesn't support this.

jluerken 11-03-2005 07:36 PM

Quote:

Originally Posted by Mystics
I don't think this can be done automatically. The product system doesn't support this.

Can you then provide me with a list of phrases belonging to the prefix hack so that I can translate them one by one manually? :-(

Mystics 11-03-2005 07:45 PM

Quote:

Originally Posted by jluerken
Can you then provide me with a list of phrases belonging to the prefix hack so that I can translate them one by one manually? :-(

Just open the XML-file (product-threadprefix_deutsch.xml) with a text editor and scroll down to <phrases>.

havefun 11-03-2005 08:18 PM

/me clicked install

everything worked fine. THX!

Mijae 11-03-2005 09:23 PM

Excellent.

Anyway to have images instead of text?

Mystics 11-03-2005 09:57 PM

Quote:

Originally Posted by Mijae
Anyway to have images instead of text?

Hm, no. Why don't you use post icons?


All times are GMT. The time now is 04:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01640 seconds
  • Memory Usage 1,854KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete