vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   separate tags (https://vborg.vbsupport.ru/showthread.php?t=179343)

Hamel el Mesl 05-15-2008 03:06 PM

separate tags
 
Hello all,

These problem seems to be international one.

In vbulletin 3.7.0, you have to separate tags by a comma >> (,)

The problem that my forum is arabic one, and in arabic the comma is a different letter.
I mean in the keyboard, when I'm writing arabic, i press another button to write a comma, so the tags are not separated because they are read as one tag, the arabic comma is read as usual letter.

When i submitted a support ticket, i recieved this reply;

Quote:

Hi there;
The same problem is with other multi-byte languages such as Chinese, too. Unfortunately, there is no work around for this without editing the source code, and we cannot provide support for that. Please ask over on vbulletin.org for a possible solution.

Best regards
Andy Huang
vBulletin Support Team
So, how can we go to this code ?
Is there any solution for that problem, especially because as i said it is an international problem !! :eek:

Lynne 05-15-2008 03:19 PM

I think you would have to actually go in and modify the code. See this in functions_bigthree.php (near the bottom of the file):
Quote:

function fetch_tagbits($threadinfo)
{
global $vbulletin, $stylevar, $vbphrase, $show, $template_hook;


if ($threadinfo['taglist'])
{
$tag_array = explode(',', $threadinfo['taglist']);

$tag_list = '';
foreach ($tag_array AS $tag)
{
$tag = trim($tag);
if ($tag === '')
{
continue;
}
$tag_url = urlencode(unhtmlspecialchars($tag));
$tag = fetch_word_wrapped_string($tag);

$tag_list .= ($tag_list != '' ? ', ' : '');
eval('$tag_list .= trim("' . fetch_template('tagbit') . '");');
}
}
else
{
$tag_list = '';
}

eval('$wrapped = "' . fetch_template('tagbit_wrapper') . '";');
return $wrapped;
}
I think you would have to modify the explode part. If you change the comma to something else, you need to explode on that new character instead of the comma. And, edit the comma in the $tag_list also.

edit: Hmmm, I'm really not sure about this. I'm not real good with php. I'm pretty sure this is where you would play with the code, but I'm not sure exactly how. Maybe someone else (Opserty?) will come along and help.

Hamel el Mesl 05-15-2008 03:26 PM

Thank you Lynne for your interest
and we will wait to hear from you again
and i will test it myself too

just to be sure, i will color the letters that I will change

Quote:


$tag_array = explode(',', $threadinfo['taglist']);
$tag_list .= ($tag_list != '' ? ', ' : '');


Lynne 05-15-2008 03:36 PM

Yes, I *think* that is what you would change. But, as I said, I haven't tested this and if I were you, I would test it on a test site. But, you will need to get rid of all the tags you currently have on the test site because they will be separated by commas. That is in the table "thread" under the column "taglist".

Hamel el Mesl 05-15-2008 03:39 PM

I tried it Lynne

But It didn't work.

Lynne 05-15-2008 03:51 PM

Did you empty the thread table of all the tags first? What was the result of your experiment - no tags listed? Did they get input into the table at all with the new separator?

Hamel el Mesl 05-16-2008 08:17 PM

I make the changes you said.
And tried to add a new thread and added new tags and seperated them with the new comma but they hadn't been separated.
they showed up as just one tag

Lynne 05-16-2008 08:39 PM

Hmmmm, well, I'm not sure then what needs to be changed.

Hamel el Mesl 05-17-2008 01:17 AM

So who can help us then ??
It's not just one person's problem..

I hope we can find the the person who can help in this..
There must be one !

MoT3rror 05-17-2008 02:05 AM

I believe the function in fetch_tagbits in functions_bigthree.php is the function you need to edit.
PHP Code:

$tag_array explode(','$threadinfo['taglist']); 

This explode seperates the taglist found in the thread table into array and the code below put all the tags together like shown on showthread.php.

The tags are insert with the function add_tags_to_thread in functions_newpost.php. Then the tags are exploded with the explode on line 627 of function fetch_valid_tags in functions_newpost.php.

You shouldn't have to edit to tags.php because in this file I believe it pulls all the tags from the tags table.

I didn't really look into changing or delete tags but that covers adding and selecting I believe.


All times are GMT. The time now is 07:01 AM.

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.01695 seconds
  • Memory Usage 1,740KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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