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 02: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 02: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 02: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 02: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 02:39 PM

I tried it Lynne

But It didn't work.

Lynne 05-15-2008 02: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 07: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 07:39 PM

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

Hamel el Mesl 05-17-2008 12: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 01: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.

Hamel el Mesl 05-17-2008 07:31 AM

Sorry Mot3rror,
But what exactly i should do now??

I changed the code once and it didn't solve the problem.
I changed this comma to a new one.
And tried to separate tags with the new comma but they were not separated.

What exactly should i do ?!
Sorry if you said something i didn't understand.

Opserty 05-17-2008 09:22 AM

fetch_tagbits is the output function, you need to find out what is going on at the input side of things. Unfortunately I don't have access to vB 3.7 at the moment so can't give direct instructions, however it would be useful for check to see if there are any tag "storing" functions or otherwise look at newthread.php and see what is happening when the tags are being written into the database.

Hamel el Mesl 05-17-2008 09:51 AM

Thank you Opserty for your caring
But acually I'm not a programmer or a coder.
So It's not easy for me to do such things.

Lynne 05-17-2008 01:06 PM

You know, this really is a big project. I just did a search through the 3.7 files for "taglist" and found several functions that deal with the list and they all "explode" or "implode" on the comma - fetch_valid_tags and insert_tags_thread (I think this one inserts the comma) and rebuild_thread_taglist. Those three are all in functions_newpost.php and you would have to make all the same sort of changes to all those functions. I also found the file threadtag.php. I'm not sure what's in there, but I would guess there are changes to be done in there also.

Are you sure no one has tackled this before?

Hamel el Mesl 05-18-2008 05:53 AM

It is big..
and yes i think no one bothered him self with this before!
But what I'm wondering more Lynne is why the vBulletin team - who created the code - doesn't want to help us in this, If they don't, who should do then !!

Lynne 05-18-2008 03:35 PM

I guess my suggestion would be to post over at vb.com about getting together a few users with this problem and seeing if you can collaborate to fix it. I think vb isn't willing to tackle it because they don't have the time for a fix in 3.7. 3.7 was supposed to just be a quick intermediate release before 4.0.

Hamel el Mesl 05-19-2008 10:28 AM

4.0 !!
and what about :
3.7.0 ,1,2,3,4.....
3.8.0 ,1,2,3,4.....
3.9.0 ,1,2,3,4.....

I really don't know ..
I will contact the support system again.
If they don't give us the solutions who should do !!!!!!

Lynne 05-19-2008 02:35 PM

There isn't going to be a 3.8 or 3.9. And, if there are revisions for 3.7, they are supposed to only be for bug fixes. They are not working on it to add anything any longer. It's full speed ahead for 4.0

Hamel el Mesl 05-23-2008 05:16 AM

Check this:
http://www.vbulletin.com/forum/proje...?issueid=25386

Lynne 05-23-2008 02:29 PM

Quote:

Originally Posted by Hamel el Mesl (Post 1528656)

That's great!!


All times are GMT. The time now is 01:41 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.01600 seconds
  • Memory Usage 1,759KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete