[MOD]Add Meta_keywords, Meta_Description for listing details page - eSyndiCat User Forums
eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [PAID] > eSyndiCat Pro v2.2.xx > Mods

Mods Completed mods for 2.2 version that enhance the functionality of the script.

 
 
Thread Tools Rate Thread Display Modes
Old 05-20-2008   #1
Nikita B.
Guest
 
Posts: n/a
Default

Greetings,

This mod allow to add meta tag information via suggest listing page on frontend or admin panel>>create, edit>> listings pages.

Directives

Add 2 new fields via Admin Panel>>Manage Listing Fields >>Add new
1 field:
Name: meta_description
English Title: Meta Description
Show On Pages: [v] Suggest Listing [ ]Listing Details //leave empty if you want to add meta tags only via admin panel
Field Type: textarea

Bind to categories: - [v] ROOT
Including subcategories:[v]

2 field:
Name: meta_keywords
English Title: Meta Keywords
Show On Pages: [v] Suggest Listing [ ]Listing Details //leave empty if you want to add meta tags only via admin panel
Field Type: textarea

Bind to categories: - [v] ROOT
Including subcategories:[v]

Also you need to bind these fields to plans.

Also you need to make changes in templates/your_template/header.tpl

Find code

Code:
	<meta name="description" content="{$description|escape:"html"}" />
	<meta name="keywords" content="{$keywords|escape:"html"}" />
Replace with

Code:
{if $listing.meta_description}
<meta name="description" content="{$listing.meta_description|escape:"html"}" />
{else}
	<meta name="description" content="{$description|escape:"html"}" />
{/if}
{if $listing.meta_keywords}
	<meta name="keywords" content="{$listing.meta_keywords|escape:"html"}" />
{else}	
	<meta name="keywords" content="{$keywords|escape:"html"}" />
{/if}


NOTE: [v] - checked checkbox
[ ] - empty checkbox
Thats all
 
Old 05-20-2008   #2
majnoon
 
majnoon's Avatar
 
Join Date: Mar 2007
Location: London (UK)
Posts: 707
majnoon is on a distinguished road
Send a message via MSN to majnoon Send a message via Yahoo to majnoon Send a message via Skype™ to majnoon
Default

thank you Nikita. esyndicat keeps getting better and better.

thanks to all the team.

Majnoon
__________________
QNJ Web Directory
majnoon is offline  
Old 05-20-2008   #3
skizz
 
Join Date: Nov 2007
Posts: 24
skizz is on a distinguished road
Default

Awesome. Will this be in the next update?
skizz is offline  
Old 05-22-2008   #4
Nikita B.
Guest
 
Posts: n/a
Default

If you have this fields displayed on listing details page, below Url , description fields..

You need to make additional changes in view-listing.tpl

FIND CODE
Code:
{if ($field.name neq 'url') && ($field.name neq 'description') && ($field.name neq 'title')}
REPLACE WITH
Code:
{if ($field.name neq 'url') && ($field.name neq 'description') && ($field.name neq 'title') && ($field.name neq 'meta_description') && ($field.name neq 'meta_keywords')}
 
Old 05-23-2008   #5
Nikita B.
Guest
 
Posts: n/a
Default

Additional modification which allow auto fill these fields from listing URL's meta information.

For Admin Side.

1. Open admin/suggest-listing.php, and add code there
Code:
if ($config->get('meta_auto_fill'))
	{
		$content = esynUtil::getPageContent($_POST['url']);
		if($content)
		{
			preg_match('/<meta.*?name=(?:[\'\"]{0,1})description(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
			$listing['meta_description'] = $match[1];
			preg_match('/<meta.*?name=(?:[\'\"]{0,1})keywords(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
			$listing['meta_keywords'] = $match[1];
		}
	}
For exmpl. Before this code
Code:
if(!empty($_POST['url']))
2.Execute this sql query via Admin Panel >>Manage Database

Code:
INSERT INTO `{prefix}config` (`id`, `group_id`, `name`, `value`, `multiple_values`, `type`, `description`, `order`) VALUES (NULL, 20, 'meta_auto_fill', '0', '''1'',''0''', 'radio', 'Listing Meta Tags Auto Fill', 80)
3. Go to Admin Panel>>Configuration>>Listings Configuration and enable Listing Meta Tags Auto Fill option there

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


For Suggest Listing on frontend

Open suggest-listing.php and add code there
Code:
if ($config->get('meta_auto_fill'))
	{
		$content = esynUtil::getPageContent($_POST['url']);
		if($content)
		{
			preg_match('/<meta.*?name=(?:[\'\"]{0,1})description(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
			$listing['meta_description'] = $match[1];
			preg_match('/<meta.*?name=(?:[\'\"]{0,1})keywords(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
			$listing['meta_keywords'] = $match[1];
		}
	}
For example before this code
Code:
	if (empty($listing['url']))
 
Old 07-08-2008   #6
Bobby01
Paid Customer
 
Bobby01's Avatar
 
Join Date: Jul 2006
Location: http://www.krynica.malopolska.pl
Posts: 828
Bobby01 is on a distinguished road
Post

Quote:
Originally Posted by Nikita B. View Post
Additional modification which allow auto fill these fields from listing URL's meta information.

For Admin Side.

1. Open admin/suggest-listing.php, and add code there
Code:
if ($config->get('meta_auto_fill'))
    {
        $content = esynUtil::getPageContent($_POST['url']);
        if($content)
        {
            preg_match('/<meta.*?name=(?:[\'\"]{0,1})description(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
            $listing['meta_description'] = $match[1];
            preg_match('/<meta.*?name=(?:[\'\"]{0,1})keywords(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
            $listing['meta_keywords'] = $match[1];
        }
    }
For exmpl. Before this code
Code:
if(!empty($_POST['url']))
2.Execute this sql query via Admin Panel >>Manage Database

Code:
INSERT INTO `{prefix}config` (`id`, `group_id`, `name`, `value`, `multiple_values`, `type`, `description`, `order`) VALUES (NULL, 20, 'meta_auto_fill', '0', '''1'',''0''', 'radio', 'Listing Meta Tags Auto Fill', 80)
3. Go to Admin Panel>>Configuration>>Listings Configuration and enable Listing Meta Tags Auto Fill option there

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


For Suggest Listing on frontend

Open suggest-listing.php and add code there
Code:
if ($config->get('meta_auto_fill'))
    {
        $content = esynUtil::getPageContent($_POST['url']);
        if($content)
        {
            preg_match('/<meta.*?name=(?:[\'\"]{0,1})description(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
            $listing['meta_description'] = $match[1];
            preg_match('/<meta.*?name=(?:[\'\"]{0,1})keywords(?:[\'\"]{0,1}).*?content="(.*?)".*?\/>/smi', $content, $match);
            $listing['meta_keywords'] = $match[1];
        }
    }
For example before this code
Code:
    if (empty($listing['url']))
Very very pretty mods.It works with version 2.2 also.05
Thanks
__________________
Best Regards,
P.S. Sorry for my English. Bible ABC Admin Panel 2.3
Bobby01 is offline  
Old 08-24-2008   #7
jaeq2007
 
jaeq2007's Avatar
 
Join Date: Sep 2007
Posts: 31
jaeq2007 is on a distinguished road
Default

Hello

Very good job.

The only thing missing is a way to update the previous lists with these options,meta keywords and meta description.

Anyone?
jaeq2007 is offline  
Old 09-05-2008   #8
Hayk
 
Join Date: Apr 2008
Posts: 31
Hayk is on a distinguished road
Send a message via Skype™ to Hayk
Default

This mod should be added to default version I think cause using mods with template editions may cause several problems with scripts further upgrading and improvement. Administrator may have an option to choose whether to show it to submit listing page or not and have ability to edit these fileds in edit listing admin page
__________________
http://www.vbboards.com - vBulletin Forums and Message Boards Directory
Hayk is offline  
Old 09-30-2008   #9
anandn
 
Join Date: Jun 2008
Posts: 25
anandn is on a distinguished road
Default

This Mod is not working with 2.2.06. I have completed ll the above mentioned steps but still Meta tags are not displayed inside Admin panel.

Please help.
anandn is offline  
Old 12-15-2008   #10
Greg
Super Moderator
 
Greg's Avatar
 
Join Date: Oct 2005
Location: Phoenix,Arizona (Valley of the Sun)
Posts: 5,362
Greg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the rough
Default

Quote:
Originally Posted by anandn View Post
This Mod is not working with 2.2.06. I have completed ll the above mentioned steps but still Meta tags are not displayed inside Admin panel.

Please help.
When someone gets some free time can this mod be updated for version 2.2.06.

Thanks
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks!
Greg is offline  
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:39 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us