![]() |
![]() |
![]() |
|
|||||||
| Mods Completed mods for 2.2 version that enhance the functionality of the script. |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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"}" />
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 |
|
|
#2 |
|
thank you Nikita. esyndicat keeps getting better and better.
thanks to all the team. Majnoon
__________________
QNJ Web Directory |
|
|
|
|
|
#3 |
|
Join Date: Nov 2007
Posts: 24
![]() |
Awesome. Will this be in the next update?
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
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')}
Code:
{if ($field.name neq 'url') && ($field.name neq 'description') && ($field.name neq 'title') && ($field.name neq 'meta_description') && ($field.name neq 'meta_keywords')}
|
|
|
#5 |
|
Guest
Posts: n/a
|
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];
}
}
Code:
if(!empty($_POST['url'])) 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)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 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];
}
}
Code:
if (empty($listing['url'])) |
|
|
#6 | |
|
Paid Customer
Join Date: Jul 2006
Location: http://www.krynica.malopolska.pl
Posts: 828
![]() |
Quote:
Thanks ![]() |
|
|
|
|
|
#7 |
|
Join Date: Sep 2007
Posts: 31
![]() |
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? |
|
|
|
|
#8 |
|
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
![]() |
|
|
|
|
|
#9 |
|
Join Date: Jun 2008
Posts: 25
![]() |
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. |
|
|
|
|
#10 | |
|
Super Moderator
Join Date: Oct 2005
Location: Phoenix,Arizona (Valley of the Sun)
Posts: 5,362
![]() ![]() ![]() ![]() |
Quote:
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! |
|
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|