Hello

September 10, 2010, 11:00:32 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
What sNews Is: - sNews is a simple, basic, customizable CMS tool suitable for developers with beginner-to-advanced PHP skills. It is also useful to have a good working knowledge of how to work with, set up and manage MySQL databases. sNews is not - geared towards the end-user who knows little or nothing about building and developing PHP-MySQL based websites.
News: Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [MOD] Headliner: an SEO Mod for sNews  (Read 253 times)
Sven
ULTIMATE member
******

Karma: 76
Posts: 1861


Chasing MY bugs!


WWW
« on: July 07, 2010, 02:00:03 PM »

 Tongue
Quote
A content search engine optimization (C.O.S.E.) script to maximize the volume or quality of traffic to a Web site (or a blog) from search engines via natural search results. It adds an headline in which you'll place synonyms related to the title of your page that will convince search engine spiders that you're the best!
For a while (a short while) the Mod is published on my blog.
If there's no issue, it's gonna be published here.
So, the online demo is there: Headliner: an SEO Mod for sNews
As you will see the Mod has been used in a different way since I needed to add this new content in an HTLM5 tag: details.
So there it's not an headline but a summary of the article.
« Last Edit: July 08, 2010, 12:39:34 PM by Sven » Logged

Fred K (agentsmith)
sNews Dude
ULTIMATE member
*****

Karma: 104
Posts: 2338


da- dadadaaaa


« Reply #1 on: July 07, 2010, 06:44:39 PM »

[clap, clap,  clap]

However, I'm a bit confused. Here's why:

In point 7 of the mod descr, you say:
Quote from: m'sieu l'inspecteur Sven-Philippe esq.
Now in PROCESSING (CATEGORIES, CONTENTS, COMMENTS), find:
$h1_title = clean(entity($_POST['h1_title']));
and paste under it, this one:
// COSE MOD#1
    $h1_title = clean(entity($_POST['h1_title'])); // Isn't this the same as the line above??
//

It seems like h1_title is used twice, exactly the same way? Or am I seeing stars?
Otherwise very nice and I think I'll give you a karmapoint just because it's nice. Cool

Oh, yeah, meant to ask ... are you using a script to open/close the summary?
Ah! Never mind, I think I found it (?)
« Last Edit: July 08, 2010, 01:21:54 AM by Fred K (agentsmith) » Logged

Sven
ULTIMATE member
******

Karma: 76
Posts: 1861


Chasing MY bugs!


WWW
« Reply #2 on: July 08, 2010, 07:34:12 AM »

[clap, clap,  clap]

However, I'm a bit confused. Here's why:
(...)
Embarrassed
Oops!
Correction:
Code:
$description = clean(entity($_POST['description']));
Oh, yeah, meant to ask ... are you using a script to open/close the summary?
Ah! Never mind, I think I found it (?)
Yeap. That's the one. I minified it:
Code:
<script>if(!(open in document.createElement('details')))document.documentElement.className+=' no-details'</script>
 <script>
(function(a){a.fn.noSelect=function(){function b(){return!1}return a(this).each(function(){this.onselectstart=this.ondragstart=b;a(this).mousedown(b).css({MozUserSelect:'none',WebkitUserSelect:'none',userSelect:'none'})})}})(jQuery);$(function(){if(!('open'in document.createElement('details'))){$('details').each(function(){var $details=$(this),$detailsSummary=$('summary',$details),$detailsNotSummary=$details.children(':not(summary)'),$detailsNotSummaryContents=$details.contents(':not(summary)');if(!$detailsSummary.length){$detailsSummary=$(document.createElement('summary')).text('Le pitch').prependTo($details);};if($detailsNotSummary.length!==$detailsNotSummaryContents.length){$detailsNotSummary=$detailsNotSummaryContents.wrap('<div>').parent();$details.attr('open')?$detailsNotSummary.show():$detailsNotSummary.hide();};$detailsSummary.noSelect().attr('tabindex',0).click(function(){$detailsSummary.focus();$details.attr('open')?$details.removeAttr('open'):$details.attr('open','open');$detailsNotSummary.toggle(0);$details.toggleClass('open');}).keyup(function(event){if(13===event.keyCode||32===event.keyCode){if(!($.browser.opera&&13===event.keyCode)){event.preventDefault();$detailsSummary.click();};};});});if($.browser.msie&&$.browser.version<7){$detailsNotSummary.hide();$('details[open]').show();};};});var is={ie:navigator.appName=='Microsoft Internet Explorer',java:navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua:navigator.userAgent.toLowerCase(),version:parseFloat(navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win:navigator.platform=='Win32'}
is.mac=is.ua.indexOf('mac')>=0;if(is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;}
if(is.ua.indexOf('gecko')>=0){is.ie=is.ns=false;is.gecko=true;}
</script>
There's another one too on Google's code but it doesn't work with Google Chrome. Grin

Will you use this Mod?
Tell me. I have some ideas I'ld like to share. Cool
Logged

Fred K (agentsmith)
sNews Dude
ULTIMATE member
*****

Karma: 104
Posts: 2338


da- dadadaaaa


« Reply #3 on: July 08, 2010, 12:24:02 PM »

Quote from: Sven
Will you use this Mod?
Tell me. I have some ideas I'ld like to share. Cool

I haven't decided yet. In xhtml/html4 sites I tend to not want to have an additional h1 (the h1 is reserved for the global masthead) and so normally use h2 for articles, and in html5 sites I'd use the <details><summary> configuration. But as I said, I haven't decided yet. The mod could of course be reconfigured so that it puts the description in a  different element than h1, for html4/xhtml builds, which is how I think I would use it, if I use it. In all honesty, it depends on the use case.
But I will be testing it, that's for sure.
Logged

nukpana
Sr. Member
****

Karma: 27
Posts: 320


« Reply #4 on: July 08, 2010, 12:34:40 PM »

Quote
The mod could of course be reconfigured so that it puts the description in a  different element than h1
Fred, you can decide on the Header element, not the mod, unless you want the mod to do something else, then I misundertood.
Code:
<?php if (page_description()) : ?>
<h3><?php echo page_description(); ?></h3>
<?php endif; ?>

Sven, your forum link is broken
Logged
Sven
ULTIMATE member
******

Karma: 76
Posts: 1861


Chasing MY bugs!


WWW
« Reply #5 on: July 08, 2010, 12:40:52 PM »

Sven, your forum link is broken
Oops!
Corrected. Thanks Jason.
Logged

Fred K (agentsmith)
sNews Dude
ULTIMATE member
*****

Karma: 104
Posts: 2338


da- dadadaaaa


« Reply #6 on: July 08, 2010, 11:10:22 PM »

Fred, you can decide on the Header element, not the mod, unless you want the mod to do something else, then I misundertood.
Code:
<?php if (page_description()) : ?>
<h3><?php echo page_description(); ?></h3>
<?php endif; ?>

Yes, Jason, that's what I meant. Sorry if it was fuddled. Like:
Code:
<?php if (page_description()) : ?>
<div class="summary"><?php echo page_description(); ?></div>
<?php endif; ?>
Logged

Pages: [1]
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!