| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Keyword Highlighting | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I am hoping someone can assist and that others find the solution beneficial.
I am looking for a way to automatically highlight keywords in site content. In the style of say wikipedia, once a repository of keyword and landing pages strings is created, anytime this string of keywords appears in site content (welcome text, product or category descriptions) the keywords will be automatically highlighted and hyperlinks created. To illustrate, on our www.CoffeeShrine.com.au site we sell Coffee Machines, and coffee making supplies. A keywords string could be "Office Coffee Machines" which would link to the "office coffee machines" category page. Anytime we used thee striong office coffee machines in content, it would be automatically highlighted with the link pointing to the category page. The puprose of this is to significantly increase the deep linking and interconnectivity of pages in the site which would be beneficial to both humand and search engines. I know a number of blog engines have mods like this - can anyone help please? Could be one for the developers of XCSEO or CDSEO or the likes...
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() It takes some time, but the task is quite simple.
Create Smarty output filter or postfilter (two ways are possible) like this PHP Code:
and register it in smarty.php PHP Code:
But it may cause some issues if these words are hyperlink already. See the complete smarty.php below: PHP Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#3
|
|||||||
|
|||||||
![]() Wow, just like that!
Is there some way that I could limit this to just content (for example anything that is in a dialogue wrapper), or exclude anything that is wrapped anything that in certain tags such as <a>, <h1> <h2> <h3> etc etc...
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() to use this filter inside the dialogs you have to remove
PHP Code:
and insert somewhere in your dialog.tpl HTML Code:
and HTML Code:
somewhere in the end of your dialog.tpl Excluding all specific matches is also possible. You have to use regular expressions instead of str_replace function in such case. But it's more complex task. I've just figured out the common way to get over it.
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
|
|||
X-Cart forums © 2001-2020
|