- Posts: 4
COMMUNITY FORUM
Show hyphenated words in Tags?
- Siracee
-
Topic Author
- Offline
- New Member
Less
More
15 years 3 months ago #79365
by Siracee
Show hyphenated words in Tags? was created by Siracee
Could someone tell me where I can change the tag display code so it will show hypenated words rather than stripping out the hyphens as it currently is?I need to be able to tag words like Lilac-crowned but when i save the tag hyphen is dissappearing and I am left with Lilaccrowned.I have tried using html code for - -in the tags but its still stripping it out. Would appreciate any help please.thanks
Please Log in or Create an account to join the conversation.
- barbarossa
-
- Offline
- New Member
Less
More
- Posts: 4
15 years 1 day ago #79366
by barbarossa
Replied by barbarossa on topic Show hyphenated words in Tags?
Any updates on this bug? It is really kind of annoying that it auto-generates new tags with the hyphen stripped out!
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
- Offline
- Elite Member
Less
More
- Posts: 175
14 years 8 months ago #79367
by Oceanwatcher
Replied by Oceanwatcher on topic Show hyphenated words in Tags?
This bug is making problems for me too. Wish it could be fixed!
Please Log in or Create an account to join the conversation.
- David R.
-
- Offline
- Premium Member
Less
More
- Posts: 81
14 years 8 months ago #79368
by David R.
Replied by David R. on topic Show hyphenated words in Tags?
I can tell you what to hack to allow the hyphens, but I have no idea if there's any particular reason the hyphen is disabled, so use at your own risk.
In the /administrator/components/com_k2/models/item.php file at around line 576 or so you'll find this line:
$tag = str_replace('-','',$tag);
Comment it out like so:
//$tag = str_replace('-','',$tag);
In the /administrator/components/com_k2/models/item.php file at around line 576 or so you'll find this line:
$tag = str_replace('-','',$tag);
Comment it out like so:
//$tag = str_replace('-','',$tag);
Please Log in or Create an account to join the conversation.
- David R.
-
- Offline
- Premium Member
Less
More
- Posts: 81
14 years 8 months ago #79369
by David R.
Replied by David R. on topic Show hyphenated words in Tags?
Well I spoke too soon on this patch, now that i've looked at more of it and actually did a test, I can see that the problem is more complicated, and seems to be related to the use of the JTable. I'll post a follow up on this issue.
David R. said:I can tell you what to hack to allow the hyphens, but I have no idea if there's any particular reason the hyphen is disabled, so use at your own risk.
In the /administrator/components/com_k2/models/item.php file at around line 576 or so you'll find this line:
$tag = str_replace('-','',$tag);
Comment it out like so:
//$tag = str_replace('-','',$tag);
David R. said:I can tell you what to hack to allow the hyphens, but I have no idea if there's any particular reason the hyphen is disabled, so use at your own risk.
In the /administrator/components/com_k2/models/item.php file at around line 576 or so you'll find this line:
$tag = str_replace('-','',$tag);
Comment it out like so:
//$tag = str_replace('-','',$tag);
Please Log in or Create an account to join the conversation.
- David R.
-
- Offline
- Premium Member
Less
More
- Posts: 81
14 years 8 months ago #79370
by David R.
Replied by David R. on topic Show hyphenated words in Tags?
So I traced down everything that was preventing the saving of tags with hyphens. There are couple of other patches required. However, even though in my patch, you can save these tags, the tag cloud module is broken in that clicking on the tag with the hyphen does not properly find articles.
I don't have time to track down why this doesn't work right now, but if anyone badly wants the required patches to allow storing tags with hyphens, let me know and I'll list the files and changes later.
I don't have time to track down why this doesn't work right now, but if anyone badly wants the required patches to allow storing tags with hyphens, let me know and I'll list the files and changes later.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
- Offline
- Elite Member
Less
More
- Posts: 175
14 years 8 months ago #79371
by Oceanwatcher
Replied by Oceanwatcher on topic Show hyphenated words in Tags?
The rules for many languages dictate hyphens for a lot of words. And as tags are completely normal words, they also have to follow the rules of writing.
At the moment, I am having problems both in Brazilian Portuguese and in Norwegian. So I wish this one would be fixed in SVN as well...
At the moment, I am having problems both in Brazilian Portuguese and in Norwegian. So I wish this one would be fixed in SVN as well...
Please Log in or Create an account to join the conversation.