vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Thread Prefixes (https://vborg.vbsupport.ru/showthread.php?t=123033)

Alfa1 11-28-2007 05:48 PM

You can use the template modification plug in, which makes it real easy, but even easier is wait for vb 3.7 which has thread prefixes included. It should be released very soon.

ReQueM 11-30-2007 02:40 PM

How do I add this prefix links on navbar?
(ex: attached)

FIM 12-03-2007 04:52 AM

I have a question, I am currently working Thread Prefixes in 3.6.7, What if I update --> 3.6.8 , I have to reinstall everything?

doc_sameer 12-06-2007 04:36 AM

very complicated install.. took me 45 mins, but it works great!

thanks.

paulmjno 12-17-2007 12:20 AM

3.7 introduces native prefixes - what's everyone going to do? Any plans on a conversion script?

dbirosel 12-17-2007 03:35 AM

How do I remove the prefix from the 'Get New' section?

http://www.caraudiojunkyard.com/foru....php?do=getnew

rellek 12-17-2007 05:49 PM

Quote:

Originally Posted by paulmjno (Post 1402485)
3.7 introduces native prefixes - what's everyone going to do? Any plans on a conversion script?

I'd appreciate this as well :)

firstrebel 12-17-2007 06:02 PM

This question has been asked over at the vB forum and no one from vB has volunteered and answer, and Mystics is shown in ACP as a contributor to the official vB package. :confused:

Bob

Pottsy 12-17-2007 07:30 PM

There is quite a bit of work to be done. The way TP stores the prefixes is very simple, but vb does it differently, in a proper database kind of way.

If someone is good at SQL it is all quite possible though. Needs about 4 or 5 steps. Any SQL experts out there?

paulmjno 12-18-2007 02:12 PM

Quote:

Originally Posted by Pottsy (Post 1403021)
There is quite a bit of work to be done. The way TP stores the prefixes is very simple, but vb does it differently, in a proper database kind of way.

If someone is good at SQL it is all quite possible though. Needs about 4 or 5 steps. Any SQL experts out there?

Okay, looking at the database in phpMyAdmin, it looks doable, save for a few things I don't know:
  • I can't find where the TP prefixes are stored.
  • I can't find the relationship between a post and a native thread prefix. It is not in the "post" table.

If anyone can answer these, I could most likely whip up a PHP script.

paulmjno 12-18-2007 02:28 PM

^ Moment of stupidity. It's all in the "thread" table. Will see what I can whip up. :D

paulmjno 12-18-2007 02:46 PM

Mwahaha! I've done it. ;) Easy peasy. I'll post some code here - I'm not really one for writing scripts for other people (with the random problems people run into), but this should assist someone else (I've used the ezSQL class here):

PHP Code:

<?php

include_once("db.php");

$threads $db->get_results("SELECT threadid, threadprefix FROM thread");

foreach (
$threads as $thread) {
    if (
$thread->threadprefix) {
        
$db->query("UPDATE thread SET prefixid = '" strtolower($thread->threadprefix) . "' WHERE threadid = $thread->threadid");
    }
    print 
"Done threadid: {$thread->threadid}<br />";
}

?>

What I've done is pre-created the native thread prefixes matching the ones I currently use.

Pottsy 12-19-2007 06:14 PM

Quote:

Originally Posted by paulmjno (Post 1403622)

What I've done is pre-created the native thread prefixes matching the ones I currently use.


If only it were that easy (it doesn't work!!).


For each old forum that had prefixes, you need a new prefixset.

Table: prefixset
prefixsetid, varchar(25), for example if we are reading forumid 14, import14
displayorder, int(10)


The prefixset title needs to be inserted into the phrase table:

Table: phrase

languageid: 0
fieldname: prefix
product= vbulletin
text = prefix set title (eg "imported from forum 14, Off topic")
varname: prefixset_xx_title

where xx = prefixsetid eg prefixset_import14_title


This prefixsetid has to be assigned to the forum number:

Table: forumprefixset

forumid, int(10), eg 14
prefixsetid, varchar(25)


In each prefixset, the individual prefix ids are inserted:

Table: prefix

prefixid, varchar(25), no spaces! so maybe forumid like 14_001 then 14_002 etc. If you had 10 prefixes in forum 14, then we need 10 prefixids.
prefixsetid, varchar(25), from above
displayorder, int(10)

Each prefixid needs the prefix text read from the original thread prefix list for the forum inserted into 2 fields (title plain text and rich text). These are stored in the phrase table:


languageid: 0
fieldname: global
product= vbulletin
text = the old thread prefix text
varname: prefix_xx_yy

where

xx = prefixid
yy = title_rich or title_plain

eg prefix_import14_title_plain


Then each thread in the forum with a prefix from the old system has the corresponding new prefixid inserted into it:

Table: thread

prefixid, varchar(25)


The only bit I'm not sure about is:


Table: forum

lastprefixid, varchar(25)


Repeat for all forums.
Optionally transfer forum settings from old to new (mandatory thread prefix etc, but this can easily be done manually).
Finally, you have to rebuild languages.


Right, there's the challenge!

paulmjno 12-20-2007 01:01 AM

Dude, it was real easy for me. All of my thread prefixes have been transfered over. All I did was create my old prefixes in 3.7 admincp, the prefixids matched my old prefixes.

Pottsy 12-20-2007 04:17 AM

I see what you've done. It works, so long as your existing prefixes have no spaces in, and you only have one "set" of prefixes. My different forum id's all have different sets, and I have spaces in my old prefixes. :(

Hoffi 12-20-2007 09:49 AM

The Spaces can not be a big Problem. With only one Query you can turn all Spaces to Underscore that can be used in the native Prefix Mod.

It's just the Problem to create hundreds of Prefix-Sets by Hand.

Pottsy 12-20-2007 02:08 PM

I am half way there.... :)

Pottsy 12-21-2007 06:35 AM

OK, I have written a script that does the whole job of converting to 3.7.

To keep things separate, I've posted it here:

https://vborg.vbsupport.ru/showthread.php?t=165761

hyppa 01-06-2008 05:34 PM

I hvae to reinstall all of it because it f...t up my forum, i can not see new threads or anything.

This is the message i get.

Parse error: syntax error, unexpected $end in /home/3/h/hjornet/www/hjornet/includes/functions_databuild.php on line 1841

what is the easiest way to get by this??

hyppa 01-06-2008 07:57 PM

Had to upload and revert the templates to fix it.

SBlueman 01-10-2008 07:01 AM

Is there a way to exclude the thread prefixes from the rss feed output at all?

I'd like to have items in my feed not look like this:

[Falcons] Friend Says Pete Carroll Not Interested In Falcons

but like this:

Friend Says Pete Carroll Not Interested In Falcons

StreetTriple 01-10-2008 12:11 PM

it's a great mod!!!

it's perfect with 3.6.8 patch2 :up:

thanks a lot!:)

How did i can personalize the colour of each prefix?
for example, i have in "EXAMPLE" category 5 type of prefixes....(exp1-exp2-exp3-exp4-exp5)
i want to make a 5 different colors for each prefix (exp1 RED) - (exp2 BLUE) - (exp3 GREEN) ....ext...

it's possibile?
thanks!

andy91287 01-24-2008 04:12 PM

Can a pre-fix be editted by the mods/admin?

EDIT: found the other mod, sorry.

inciarco 01-25-2008 05:58 PM

One Maybe Bug:

When Searching with the Full Search Form, when including a Text, and choosing a Prefix, the search results are for all the threads in the specified forum, not all the threads that include the Prefix AND the included text!! :( :confused:

I think the logic should be that the results show Only the threads that have Both options, the search text and the Prefix!! :rolleyes: :confused:

(Is there an additional Option I should select in order to Get the Filtered results that match Both Options?? :confused:)

When Searching Only for a Prefix, and not including a search text, I receive an Error message to Include a search Text; would be Great that I can include a Prefix and search in all the Forums I like the Threads that are using that Prefix!! :rolleyes: :confused: (Is this a Bug Too?? :( :confused:)

In the Thread List of each Forum, the Filter of Threads that have a Prefix works OK!! ;)

I'm using vB 3.6.7 PL1, and seems to work Fine!! ;)

My Best Regards!! ;)

:)

Pottsy 01-25-2008 07:18 PM

inciaro, I think you may have done a template edit wrong, because my search works as expected (3.6.8 PL2). I can search successfully for a prefix with no search text, and I can searcg for text and a prefix, and it return only threads or posts with the text and the prefix.

inciarco 01-25-2008 08:34 PM

Quote:

Originally Posted by Pottsy (Post 1428875)
inciaro, I think you may have done a template edit wrong, because my search works as expected (3.6.8 PL2). I can search successfully for a prefix with no search text, and I can searcg for text and a prefix, and it return only threads or posts with the text and the prefix.

I'll double check the file and template, Edits then!! :rolleyes: :o

I appreciate your Confirmation about this issue, Pottsy!! :up:

My Best Regards!! ;)

:)

SBlueman 01-26-2008 07:09 AM

Quote:

Originally Posted by SBlueman (Post 1418830)
Is there a way to exclude the thread prefixes from the rss feed output at all?

I'd like to have items in my feed not look like this:

[Falcons] Friend Says Pete Carroll Not Interested In Falcons

but like this:

Friend Says Pete Carroll Not Interested In Falcons

Anyone?

inciarco 01-26-2008 02:55 PM

Quote:

Originally Posted by Pottsy (Post 1428875)
inciaro, I think you may have done a template edit wrong, because my search works as expected (3.6.8 PL2). I can search successfully for a prefix with no search text, and I can searcg for text and a prefix, and it return only threads or posts with the text and the prefix.

Nope... I've tried it again and same Wrong Results!! :( :confused:

I'm running it in vB 3.6.7 PL1; perhaps is an incompatibility with some other Mod I've installed, or is some Bug in the Code!! :( :confused:

Idea for Next Update: Would be Great, at least for Forums, to be able to Massive Assing Prefixes of those Individual Forums (one by one because Prefixes are Individual Per Forum) to the Selected Threads, (like when you Move, Copy, Open, Close, Thread from the List of Threads in a Forum), so that Assigning the Prefixes would be Fast!! :confused: :rolleyes:

Does this Mod have that Functionallity?? How can I do it?? because that Process with Hundreds or Thousands of Threads is ETERNAL!! :rolleyes: :eek:

My Best Regards!! ;) Great Mod!! :up:

:)

sbarbz 01-31-2008 11:43 PM

i love you man
I all day chase after users that not Mtigim the captions, and you rescue me
Thank you very much great!!!!

blankoboy 02-04-2008 05:43 AM

I have seen some sites using images for the prefixes in place of the text. Has anyone seen this and know how it's done?

shaynehammy 02-15-2008 05:56 AM

Quote:

Originally Posted by blankoboy (Post 1435858)
I have seen some sites using images for the prefixes in place of the text. Has anyone seen this and know how it's done?

I'm very interested in this but cant find a hack for it anywhere.

TheProphet 02-19-2008 12:50 PM

Anyone running this on 3.7 beta 5?

Ejecutor Hanzo 02-24-2008 05:02 PM

Quote:

Originally Posted by Amenadiel (Post 1129751)
Installed.

Hope to see a version that can auto edit templates... I was very afraid to break something when editing the templates and files lol.

Amena, you will do the job too much easy with Template-Modifikationen durch TMS, works fine in mosts skins, recently I try it, LOL.

rapidphim 02-25-2008 03:42 AM

sorry for asking this (if the question had been answered) that this hack works for vb 3.6.8 P2?

Ejecutor Hanzo 02-25-2008 09:43 PM

Quote:

Originally Posted by rapidphim (Post 1450442)
sorry for asking this (if the question had been answered) that this hack works for vb 3.6.8 P2?

yeah, do ;)

tekstylez 02-27-2008 04:45 AM

what a mess... the template edits aren't even written right...

1) Find this code:

Code:

thread.title
Doesn't even exist

Not to mention there are like 6 template edits.... pfft come on get up to date...

inciarco 02-29-2008 10:38 PM

Hello.

Question 1: Do I have to set some specific Options (Settings) for the "Full Search" Form to allow me to Search for a Prefix without specifying a Search Text?? When try to Search only for a Prefix without introducing a Search Tex, vBulletin return a Search Error Page asking for that Field to be Filled!! :confused: :(

Question 2: Do I have to set some specific Options (Settings) for the Search Results to be only the Particular Prefix Results?? When I specify a Prefix for the Search, the Results include not only the Threads that have that Prefix, but also the Threads that contain the Search Text, (remember question 1)!! :confused: :(

I've tried this Mod with vB 3.6.7 PL1, and now I'm trying it with vB 3.6.8. PL2, with the same Two Errors happening!! :( What Should I Check?? :confused: What Can I do?? :confused:

My Best Regards. I Like This Mod a Lot!! ;)

:)

DieselTruck 03-06-2008 12:16 AM

I need to get mine to look like this. With the Prefixes intergraded with the categories:

DieselTruck 03-10-2008 01:11 AM

Anyway to remove the "Prefix" Column from the searches? Just only show the Prefixes in the Forum their assigned to?

SpeedFreak 03-14-2008 11:34 AM

Quote:

Originally Posted by TheProphet (Post 1446615)
Anyone running this on 3.7 beta 5?

lol ever noticed that this option is a standard in the vbulletin version 3.7.x , in your admincp you can add the prefix


All times are GMT. The time now is 12:54 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.01708 seconds
  • Memory Usage 1,836KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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