script request

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
Pappnase

script request

Post by Pappnase »

hello

i'm looking for an script. :(

the idea i had is. that you can define in this script an keyword and an link for this keyword. for example "imagebrowser" an in every article where you find the word "imagebrowser" is linked to another article or page...

would this be possible!?
kubens
Posts: 168
Joined: Sat 6. Nov 2004, 15:29
Location: Duesseldorf near Cologne ;-)

Post by kubens »

Hi Oliver,

if I understand your idea correct then it seems that you are interested in an enhanced 'RELATED' replacement tag. Instead just to consider key words from the article level you want to search against article content. From my point of view this would be possible if we could ensure that some tables respective some columns have fulltext indexes. Then we could use the MATCH operator:

Code: Select all

SELECT * FROM phpwcms_articlecontent c WHERE MATCH (acontent_text )AGAINST ('Hurghada')
I assume that you want show the article title inside the link then we need a join against the article table otherwise we will not able to create the link with the correct text.

Code: Select all

SELECT a.article_title FROM v1_phpwcms_article a, v1_phpwcms_articlecontent c WHERE a.article_id = c.acontent_aid AND MATCH (acontent_text )AGAINST ('El Gouna')
Do you want use only one keyword or are you interested in using a list of keywords? It is possible, but you must specify more details. Sometimes it is like Xmas anywhere is a guy who listen to your wishes and 'Inshallah' they will come true :D

Br
Wolfgang
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

If I remember it right there has been some discussion about this here some time ago with some postings of OG too - but cannot remember anymore when... :cry:

claus
Pappnase

Post by Pappnase »

hello kubens

thanx, for your fast answer :-)

but, my idea was in something other then the enhancement of the relatet tag.

so i try to explain a little better :-)

for example i had following artcle /cp

"Welcome to the project „Documentation For The Web Content Management System phpWCMS“. Whether you are new to content management systems or consider changing to phpwcms – to make working with phpWCMS easy for you we aim to cover all areas of working with it: from installation and set-up to editing of articles and the maintenance of the completed site."

now maybe i had an frontend_render script wich looks into the article and in this script i define everytime it found the word phpwcms it will place a link at the word phpwcms to ww.phpwcms.de ...

so that the result would be

"Welcome to the project „Documentation For The Web Content Management System phpWCMS“. Whether you are new to content management systems or consider changing to phpWCMS – to make working with phpWCMS easy for you we aim to cover all areas of working with it: from installation and set-up to editing of articles and the maintenance of the completed site."


hopefully this is possible somehow
:? :shock:
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

Found it
http://www.phpwcms.de/forum/viewtopic.p ... sc&start=0
perhaps this can push your project...
claus
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

Post by phalancs »

Thanx for the link, just wanted to post it.

Remember: If you use the (modified) script, then you should be aware to use only unique keywords. Otherwise the replacement could seriously damage the code.
2008
Post Reply