The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Change Tag Separators
Tags are separated by comma by default. How can I change this to a other character?
EDIT: Solved!! 1. in includes/class_taggablecontent.php there's a function split_tag_list(), and around line 295 there's this: Change ',' to '\\\\' Code:
$delimiters = array(','); Code:
public function fetch_rendered_tag_list() { $taglist = $this->fetch_existing_tag_list(); return fetch_tagbits(implode(", ", $taglist)); } Code:
function fetch_tagbits($tags) { global $vbulletin, $vbphrase, $show, $template_hook; $tagcount = 0; $tag_list = array(); if ($tags) { $tag_array = explode(',', $tags); foreach ($tag_array AS $tag) { $row = array(); $tag = trim($tag); if ($tag === '') { continue; } $tagcount++; $row['tag'] = fetch_word_wrapped_string($tag); $row['url'] = urlencode(unhtmlspecialchars($tag)); $row['comma'] = '$vbphrase['comma_space']'; |
#2
|
|||
|
|||
In Settings > Options > Tagging Options, there's a "Tag Separators" setting where you can enter additional separators, but for some reason you can't remove comma as a separator (you'd have to find the code that looks for commas and change it).
|
#3
|
|||
|
|||
Yes I know that kh99. And I need help with that. I can't do that on my own.
|
#4
|
|||
|
|||
Well, in includes/class_taggablecontent.php there's a function split_tag_list(), and around line 295 there's this:
Code:
$delimiters = array(','); which seems to be where comma is defined as a delimiter. You could try changing or deleting the comma from that line, but I haven't tried it and I don't know if it's the only place where you'd need to make a change. |
#5
|
|||
|
|||
Already tried that one. Didn't help
|
#6
|
|||
|
|||
Well, that's one place, and changing it to a semicolon allowed me to enter tags separated by semicolons, but some of the display code still uses commas. In that same file around line 894 there's this:
Code:
public function fetch_rendered_tag_list() { $taglist = $this->fetch_existing_tag_list(); return fetch_tagbits(implode(", ", $taglist)); } and then in includes/functions_bigthree.php around line 435 there's function fetch_tagbits($tags) which expects a comma-separated list of tags. That function formats the list using a phrase $vbphrase['comma_space'] (and you probably don't want to change the text of that phrase because it's used in other places). |
#7
|
|||
|
|||
Quote:
|
#8
|
|||
|
|||
Yeah, you would have to change this (the comma in red):
Code:
public function fetch_rendered_tag_list() { $taglist = $this->fetch_existing_tag_list(); return fetch_tagbits(implode(", ", $taglist)); } and then in includes/functions_bigthree.php around line 435, another comma in red (in the explode call), and the $vbphrase['comma_space'] you can replace a string: Code:
function fetch_tagbits($tags) { global $vbulletin, $vbphrase, $show, $template_hook; $tagcount = 0; $tag_list = array(); if ($tags) { $tag_array = explode(',', $tags); foreach ($tag_array AS $tag) { $row = array(); $tag = trim($tag); if ($tag === '') { continue; } $tagcount++; $row['tag'] = fetch_word_wrapped_string($tag); $row['url'] = urlencode(unhtmlspecialchars($tag)); $row['comma'] = $vbphrase['comma_space']; there may be other places as well, but try this. |
#9
|
|||
|
|||
Quote:
|
#10
|
|||
|
|||
No, I would just make it $row['comma'] = '\\ '; (the backslash needs to be escaped, so there's three chars in there - two backslashes and a space).
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|