Support Forums

add keyword for each listings

This is a discussion on add keyword for each listings within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Hi everyone i would like to share this code to help all people here to add keyword for each listings ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 03-07-2010, 06:00 AM   #1
Customer
 
Abdulaziz's Avatar
 
Join Date: Sep 2008
Location: Kuwait
Posts: 61
Rep Power: 14
Abdulaziz is on a distinguished road
Default add keyword for each listings

Hi everyone

i would like to share this code to help all people here

to add keyword for each listings open file viewlisting.php
then go to the line 77 and under the line add this code
PHP Code:
$sitekeywords str_replace(" "", "$rs['title']);
$class_tpl->assign('sitekeywords'$sitekeywords); 
then safe the file and upload it in your website
__________________
Developer 4.1.9
Abdulaziz is offline   Reply With Quote
Old 03-07-2010, 06:35 AM   #2
Just get on with it!
 
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 486
Rep Power: 34
michael is just really nice michael is just really nice
Default

Thank you for sharing Abdulaziz. Have I got this right? Does your code/mod allow users to add keywords to their ad's that the site search will pick up on?

If so that seems like a good idea!

__________________
M Michael
V4.2.3 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 03-07-2010, 08:16 AM   #3
Customer
 
Abdulaziz's Avatar
 
Join Date: Sep 2008
Location: Kuwait
Posts: 61
Rep Power: 14
Abdulaziz is on a distinguished road
Default

thanks for replay Michael,

this code get the title and replace the space with , to be as a keyword for the listing.
but if want to allow the user to write the keyword by hisself it can be done with add one extra field that can hold the keyword with seperate words with , and modify some file in the script

i wish this would be clear for you
__________________
Developer 4.1.9
Abdulaziz is offline   Reply With Quote
Old 03-07-2010, 08:17 AM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

A nice touch.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Old 03-14-2010, 06:02 AM   #5
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 14
ronin is on a distinguished road
Default

Quote:
Originally Posted by Abdulaziz
Hi everyone

i would like to share this code to help all people here

to add keyword for each listings open file viewlisting.php
then go to the line 77 and under the line add this code
PHP Code:
$sitekeywords str_replace(" "", "$rs['title']);
$class_tpl->assign('sitekeywords'$sitekeywords); 
then safe the file and upload it in your website
Hi Abdulaziz, really nice!

I have a question, 'cause I'm not a php coders.
How can I add some extra and fixed meta keywords to the strings?
That is: suppose one of my listing have this meta key:
"listingkey1, listingkey2, listingkey3, listingkey4, ecc.."

how can I modify your code to achive this:
"my-site-keyword_01, my-site-keyword_02, my-site-keyword_03, listingkey1, listingkey2, listingkey3, listingkey4, ecc.."

..............

More..
I notice that if title have " simbol, this simbol is passed to meta-key too.
So, you ca have meta-key like that:
<meta name="keywords" content="keyword1, keyword1, "keyword3", keyword4" />

Thanks for reply!
ronin is offline   Reply With Quote
Old 03-15-2010, 06:21 AM   #6
Customer
 
Abdulaziz's Avatar
 
Join Date: Sep 2008
Location: Kuwait
Posts: 61
Rep Power: 14
Abdulaziz is on a distinguished road
Default

Quote:
Originally Posted by ronin
Hi Abdulaziz, really nice!

I have a question, 'cause I'm not a php coders.
How can I add some extra and fixed meta keywords to the strings?
That is: suppose one of my listing have this meta key:
"listingkey1, listingkey2, listingkey3, listingkey4, ecc.."

how can I modify your code to achive this:
"my-site-keyword_01, my-site-keyword_02, my-site-keyword_03, listingkey1, listingkey2, listingkey3, listingkey4, ecc.."

..............

More..
I notice that if title have " simbol, this simbol is passed to meta-key too.
So, you ca have meta-key like that:
<meta name="keywords" content="keyword1, keyword1, "keyword3", keyword4" />

Thanks for reply!
i am so happy to hear that . you can allow the user to add his own keyword that can be done by add one more extra field for all categories then he can add his own keyword . after that take the name of extra field and replace
PHP Code:
$sitekeywords str_replace(" "", "$rs['title']);
$class_tpl->assign('sitekeywords'$sitekeywords); 
with
PHP Code:
$class_tpl->assign('sitekeywords'$the_name_of_the_extra_field); 
thats all
but i didn't recommend that because the user doesnot know anything about keyword and maybe he will hate to fill alot of field that is my opinion.
__________________
Developer 4.1.9
Abdulaziz is offline   Reply With Quote
Old 03-15-2010, 07:10 AM   #7
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 14
ronin is on a distinguished road
Default

Hi Abdulaziz,

thanks for your reply, but maybe you misunderstanding me (sorry, I wrote in bad english..)

I don't want user define their own keywords, because I'm with you: ser doesnot know anything about keyword and maybe he will hate to fill alot of field

I want simply add my own set of keyword to any listing.
That is: suppose I want to have keyword "free lising, add free listing" to ANY listing, so.. a boat listing (having now) keyword "boat, rent, for days, ecc.." become "free listing, add free listing, boat, rent, for days, ecc.."

So: my set of keywords + listing keyword.

/////////////

More, what about the issue I found?
Is there any way to "srip off " any " simbols from keywords?

Thanks!
ronin is offline   Reply With Quote
Old 03-15-2010, 09:02 AM   #8
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

Why don't you add the category to the viewlisting title etc.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Old 03-15-2010, 12:46 PM   #9
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 14
ronin is on a distinguished road
Default

Quote:
Originally Posted by seymourjames
Why don't you add the category to the viewlisting title etc.
Could be fine, too.

I prefer considere both solutions.

Thanks, seymourjames!
ronin is offline   Reply With Quote
Old 03-17-2010, 02:13 AM   #10
Customer
 
Abdulaziz's Avatar
 
Join Date: Sep 2008
Location: Kuwait
Posts: 61
Rep Power: 14
Abdulaziz is on a distinguished road
Default

if your set of keywords are static that can be done easy with listing keyword but if that dynamic it should be as a field like what is said before so please could you tell which one do want ?
__________________
Developer 4.1.9
Abdulaziz is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO: install in keyword rich directory nlassiter Site Marketing 4 08-22-2009 01:51 PM
v4.0.x how to random listings in function feature listings horizontal hel68c Modules / Plugins / Modifications 2 07-02-2009 01:27 PM
Search Box by keyword HorseOptions Technical Support 2 12-09-2008 12:54 PM
New Free Keyword Suggestion Tool SkGold Site Marketing 1 02-01-2007 09:48 AM


All times are GMT -4. The time now is 06:51 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0