- Posts: 9
COMMUNITY FORUM
sh404SEF plugin for K2 2.0
- Kailey Lampert
- Offline
- New Member
Less
More
15 years 2 months ago #71511
by Kailey Lampert
Replied by Kailey Lampert on topic sh404SEF plugin for K2 2.0
I'm also having a problem with multi-word tags (anything with a space in it).
Anybody else have this problem and know how to fix, or is it just me?
I'm running K2 2.1 and sh404sef 1.0.20_Beta - build_237
Everything is working great, except when I click on a tag that is more than one word...
Jeff Cooper said:I've found a problem with K2 tags, when the tag consists of more than one word. For example, "barbie doll". SH404SEF is using a URL with a "% 20" inserted in place of the space that is in between the two words. The result is a 404 missing error when I try to access K2 articles with that tag. One-word tags work fine. Anyone come across this, or a fix? thanks Jeff
Anybody else have this problem and know how to fix, or is it just me?
I'm running K2 2.1 and sh404sef 1.0.20_Beta - build_237
Everything is working great, except when I click on a tag that is more than one word...
Jeff Cooper said:I've found a problem with K2 tags, when the tag consists of more than one word. For example, "barbie doll". SH404SEF is using a URL with a "% 20" inserted in place of the space that is in between the two words. The result is a 404 missing error when I try to access K2 articles with that tag. One-word tags work fine. Anyone come across this, or a fix? thanks Jeff
Please Log in or Create an account to join the conversation.
- Cornerstone Properties, LLC
- Offline
- New Member
Less
More
- Posts: 18
15 years 2 months ago #71512
by Cornerstone Properties, LLC
Replied by Cornerstone Properties, LLC on topic sh404SEF plugin for K2 2.0
It's not just you. A work around I'm using is to add a '-' between all tags. In my earlier example, my tag for 'barbie doll' would be 'barbie-doll'. The sh404sef url will then allow for a working url to the tag. Not a true fix, but...
Please Log in or Create an account to join the conversation.
- Kailey Lampert
- Offline
- New Member
Less
More
- Posts: 9
15 years 2 months ago #71513
by Kailey Lampert
Replied by Kailey Lampert on topic sh404SEF plugin for K2 2.0
I saw that and if I have to, I might go with that. But I'd love a 'real' fix since this is for a client.
Jeff Cooper said:It's not just you. A work around I'm using is to add a '-' between all tags. In my earlier example, my tag for 'barbie doll' would be 'barbie-doll'. The sh404sef url will then allow for a working url to the tag. Not a true fix, but...
Jeff Cooper said:It's not just you. A work around I'm using is to add a '-' between all tags. In my earlier example, my tag for 'barbie doll' would be 'barbie-doll'. The sh404sef url will then allow for a working url to the tag. Not a true fix, but...
Please Log in or Create an account to join the conversation.
- Kailey Lampert
- Offline
- New Member
Less
More
- Posts: 9
15 years 2 months ago #71514
by Kailey Lampert
Replied by Kailey Lampert on topic sh404SEF plugin for K2 2.0
Hopefully this will be helpful to someone who is having the same two-word tag issue that I was having:
If you take the spaces in the URL and replace them with pluses ('+') it'll work. For example:
broken url:
domain.com/tag/two word.html
fixed url:
domain.com/tag/two+word.html
I've just used a little str_replace() function in the template files. I edited these three files and it seems to have covered all links:
/components/com_k2/templates/default/item.php (line 322 for me)
/components/com_k2/templates/default/category_item.php (line 190)
/modules/mod_k2_tools/tmpl/tags.php (line 19 in original, 26 in the modified version[k2community.joomlaworks.gr/forum/topics/improved-tag-cloud])
If somebody has a better idea, please do share
If you take the spaces in the URL and replace them with pluses ('+') it'll work. For example:
broken url:
domain.com/tag/two word.html
fixed url:
domain.com/tag/two+word.html
I've just used a little str_replace() function in the template files. I edited these three files and it seems to have covered all links:
/components/com_k2/templates/default/item.php (line 322 for me)
/components/com_k2/templates/default/category_item.php (line 190)
/modules/mod_k2_tools/tmpl/tags.php (line 19 in original, 26 in the modified version[k2community.joomlaworks.gr/forum/topics/improved-tag-cloud])
If somebody has a better idea, please do share
Please Log in or Create an account to join the conversation.
- B_Dark
- Offline
- Premium Member
Less
More
- Posts: 126
15 years 1 month ago #71515
by B_Dark
Replied by B_Dark on topic sh404SEF plugin for K2 2.0
why the don't show me in tab pluging of sh404sef?!
Kai Roen said:Great work. I have modified the file as you described above, and download the file from this location:
www.dmtalvdal.no/images/stories/dokumenter/com_k2.zip
Unzip the file and upload it to: /components/com_sh404sef/sef_ext/
Kai Roen said:Great work. I have modified the file as you described above, and download the file from this location:
www.dmtalvdal.no/images/stories/dokumenter/com_k2.zip
Unzip the file and upload it to: /components/com_sh404sef/sef_ext/
Please Log in or Create an account to join the conversation.
- tonino
- Offline
- New Member
Less
More
- Posts: 2
14 years 11 months ago #71516
by tonino
Replied by tonino on topic sh404SEF plugin for K2 2.0
to operate properly the function search edit / components/com_sh404sef/sef_ext/com_k2.php line 131
change
$ title [] = 'search';
in
$ title [] = 'searchword';
change
$ title [] = 'search';
in
$ title [] = 'searchword';
Please Log in or Create an account to join the conversation.
- Kailey Lampert
- Offline
- New Member
Less
More
- Posts: 9
14 years 10 months ago #71517
by Kailey Lampert
Replied by Kailey Lampert on topic sh404SEF plugin for K2 2.0
Hey, sorry I never responded - I'm not always on top of these things....
For you, or anyone else who's interested: projects.trepmal.com/joomla/tags.php.txt
scott said:Hi Kailey, could you give me an example line of how to do the str_replace, ive tried str_replace on the array and also in the echo but neither seem to have any affect
For you, or anyone else who's interested: projects.trepmal.com/joomla/tags.php.txt
scott said:Hi Kailey, could you give me an example line of how to do the str_replace, ive tried str_replace on the array and also in the echo but neither seem to have any affect
Please Log in or Create an account to join the conversation.
- scyllar
- Offline
- Senior Member
Less
More
- Posts: 60
14 years 8 months ago #71518
by scyllar
Replied by scyllar on topic sh404SEF plugin for K2 2.0
Hello everyone! my first post here...
I am new to k2 but i have got a question: there is already built in k2 sef ext ../com_k2/sef_ext/com_k2.php and i found it working well with 404sef, so i don't see any necessity of using another 404sef plugin, or am i just missing something obvious? Any body please tell me :) thanks :)
Let me know if i posted at wrong place...
I am new to k2 but i have got a question: there is already built in k2 sef ext ../com_k2/sef_ext/com_k2.php and i found it working well with 404sef, so i don't see any necessity of using another 404sef plugin, or am i just missing something obvious? Any body please tell me :) thanks :)
Let me know if i posted at wrong place...
Please Log in or Create an account to join the conversation.
- Kai Roen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
14 years 8 months ago #71519
by Kai Roen
Replied by Kai Roen on topic sh404SEF plugin for K2 2.0
Hi Scyllar, you are correct. Plugin in this thread was for K2 version 2.0. It was already included in 2.1 or 2.2.
scyllar said:Hello everyone! my first post here... I am new to k2 but i have got a question: there is already built in k2 sef ext ../com_k2/sef_ext/com_k2.php and i found it working well with 404sef, so i don't see any necessity of using another 404sef plugin, or am i just missing something obvious? Any body please tell me :) thanks :)
Let me know if i posted at wrong place...
scyllar said:Hello everyone! my first post here... I am new to k2 but i have got a question: there is already built in k2 sef ext ../com_k2/sef_ext/com_k2.php and i found it working well with 404sef, so i don't see any necessity of using another 404sef plugin, or am i just missing something obvious? Any body please tell me :) thanks :)
Let me know if i posted at wrong place...
Please Log in or Create an account to join the conversation.