Author |
Message |
alien73
Involved


Joined: Sep 15, 2008
Posts: 352
|
Posted:
Wed Jan 14, 2009 10:29 am |
|
Hello all...
I'm just about done with my Meta Tags hack for articles and will add it to all modules soon. I already have the articles done in good working order... This will add meta tags on a page by page basis and not just one global meta tag.
More to come!
It would be great to see this in the core PN. |
|
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Wed Jan 14, 2009 10:46 am |
|
Alien thats great !
In RN or NP ?
I had this before in articles until I upgraded to 7.6 .Is yours dynamic or do you need to add different kws for each article? |
|
|
|
 |
alien73

|
Posted:
Wed Jan 14, 2009 11:32 am |
|
Thanks Susann,
It's for RN but will work with any Nuke or Nuke fork... I can make it be dynamic by using the title in the keywords separated by comma and the description would be hometext limited to 255 charaters. You can then edit it to your liking....
The meta tags would be inserted right when you add the content not a separate module. No need to add another step to the process.
The RN core really needs meta tags...
There's 2 things that is holding nuke back from being as good as joomla, drupal etc..
1. Complete Control over Blocks
2. Meta Tags with every module, page, contect etc..
The complete block feature is something I'm working on. |
|
|
|
 |
alien73

|
Posted:
Wed Jan 14, 2009 11:56 am |
|
I should also mention the Meta Tags mod will come with the robot tags "Follow, Nofollow, Index, Noindex... so you can actually assign a different robot tag to every article, content page etc.. |
|
|
|
 |
jestrella
Moderator

Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic
|
Posted:
Thu Jan 15, 2009 5:51 pm |
|
Really interesting man. kind of eager to see your approach.
Keep your good work |
_________________ "For those whom have not reach the sky... Every mountain seems high"
Best Regards
Jonathan Estrella
http://about.me/jestrella04 |
|
|
 |
jestrella

|
Posted:
Thu Jan 15, 2009 5:59 pm |
|
a question? you said you're planning to cover other modules as well... What other modules are you planning to include?
In fact I have developed an addon for *nuke that do the same work but on a module based manner, you can check it out on my site, also Kevin is working on his nukeSEO package that will also ship with metatag management.
Let's see what happens, maybe we can join forces an develop the rock-solid solution that *nuke is crying out for. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Jan 15, 2009 11:35 pm |
|
Just as a tickler Alien73 will soon be joining the RN Team so collaboration will make joining forces rather easy  |
|
|
|
 |
alien73

|
Posted:
Fri Jan 16, 2009 7:46 am |
|
My approach is simple "less code" and will work with any module that needs meta tags. Right now I have the news module done and you can either add custom meta keywords,description and robot tags to every article or leave them blank to use the auto feature so the title will be used as the keywords and the hometext will be used as the description. With a little trickery the commas can be added and we can cut the description to 255 characters... Bam... Now all you need is the search engine bots to come knock on your door! |
|
|
|
 |
alien73

|
Posted:
Fri Jan 16, 2009 7:55 am |
|
jestrella
I checked out your module meta which is great.... It would be great to add the 2 together for sure.. |
|
|
|
 |
jestrella

|
Posted:
Fri Jan 16, 2009 9:03 am |
|
Glad to read that.  |
|
|
|
 |
alien73

|
Posted:
Fri Jan 16, 2009 3:40 pm |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Fri Jan 16, 2009 7:29 pm |
|
Sorry to jump in late on this.
My approach is to use a table and module classes (actually, extensions to existing module classes), and override from the table (if a record exists for the content or module) or use the class to generate the title, description and keywords from the content if not. That would work with most modules, and any that don't have classes would use index page (site default) title / meta tags.
The challenge is how to determine whether or not tags generated from the content are sufficient and, if not, whether or not to combine content-level generated tags with defaults for module and / or site.
alien73, what do you mean by robot tags? |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
alien73

|
Posted:
Fri Jan 16, 2009 7:56 pm |
|
Here's how I do it: Very Simple........The keywords,description, robot tags can be added when adding an article or if left blank it uses the article title and hometext description so it is also automatic which will be very useful for someone who has tons of articles.
here's the basic function
function metatags(){
global $prefix, $db, $dtitle, $dhometext, $dkeys, $mdescription, $rbot;
$url = getenv ("REQUEST_URI");
//Other REQUEST_URI are possible if using Short Links etc..
if ((ereg("article\&sid=([0-9]{1,5})",$url,$get)) || (ereg("article([0-9]{1,5}).html",$url,$get))) {
$storyid = $get[1];
$gettags = $db->sql_query('select title, hometext, mkeys, mdescription, rbot from '.$prefix.'_stories WHERE sid=\''.$storyid.'\'');
while(list($dtitle, $dhometext, $dkeys, $mdescription, $rbot) = $db->sql_fetchrow($gettags)){
return $dtitle;
return $dhometext;
return $dkeys;
return $mdescription;
return $rbot;
}
}
}
?>
Robot tags like INDEX, FOLLOW, NOINDEX, NOFOLLOW etc....
So if you have a article you didn't want indexed |
|
|
|
 |
kguske

|
Posted:
Sat Jan 17, 2009 9:41 am |
|
Instead of modifying the tables that contain content to have overrides, I used 2 new tables:
1. META tag definitions and default values
2. META tag overrides at site, module, category, content level
That enables a single function to generate the meta tags without touching the modules, and a single override maintenance function, again, without touching the modules.
It also allows you to override any META tag at any level for any module (and, with a little extra effort, for any language).
Here's a sample of the tables:
META tag definitions
META tag overrides
I might need to add a table (or another field) to define the allowable / recommended values for each META tag type. |
|
|
|
 |
alien73

|
Posted:
Sun Jan 18, 2009 9:07 am |
|
I really like your approach "great job", but doesn't this add another step when adding meta data. Meta should be right there on the same page when you adding content to keep things simple. What if a site has over 1000 articles wouldn't they have to go through each one and edit the Meta info.
I also work with Mambo, Joomla, Drupal, Typo, Contrete5 and all have meta info from the page where your adding content.
It would be awesome to have NUKESEO, but use my approach if they are just to lazy and want to use a auto feature. Either that or use a ajax feature to load NUKESEO on any page your adding content keeping thing in one step. |
|
|
|
 |
jestrella

|
Posted:
Sun Jan 18, 2009 12:03 pm |
|
Human logic is far beyond what a computer can generate, IMHO. Users should have the option to place metatags by themselves and if they are not set by the users then there's must be a way to auto-populate metatags depending on different facts like module being loaded and content type and the content itself of the displaying page. This has always be the way I want metatags to behave in our beloved *nuke. |
|
|
|
 |
kguske

|
Posted:
Sun Jan 18, 2009 12:06 pm |
|
I should have clarified that the approach for nukeSEO is to generate the META tags based on the specific content, or use an override if it was defined (i.e. sites wouldn't have to touch META tags for existing or new content, if the generated tags were sufficient). The thought was to provide a lightbox available to admins for maintaining the META tags for a specific page / content.
But you have a good point: there would be no way to do that on the content creation without modifications to the module content creation functions. It would require an extra step if the generated tags weren't sufficient.
It might be more efficient (processing wise) to generate the tags when creating the content (rather than on-the-fly), but then the issue would be how to handle it when updating the content (should it regenerate the tags if they were generated before, or simply allow editing)? And if they're not generated dynamically, then we would need generators for existing content.
One of the issues I alluded to previously was having overrides at multiple levels. For example, some content might not be adequate for generating META tags at the content level (e.g. short articles, posts, etc.). For these, you might wish to use a module-level or category-level approach as has been used by others. If you're dynamically generating META tags, what rules determine when to use the levels when there is no content-specific override? Or do you require content-specific override (which brings up issues with existing content)? I am really interested in hearing thoughts on this.
How about a hybrid approach that gets the benefits of both: modify the modules (starting with News and Content) to maintain the override table, and then have the standalone approach for modules that haven't been modified. We could develop a simple function for inserting META tags on creation, and have a simple template to add to modules when creating content to add, update and delete the content-specific overrides. |
|
|
|
 |
alien73

|
Posted:
Sun Jan 18, 2009 1:29 pm |
|
Sounds good to me... I'm very passionate about this and want the best possible solution.
PM me when you get a chance I like to see your full code. |
|
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sun Jan 18, 2009 1:45 pm |
|
looks very cool guys... and when your done..
How about a "Tags" block that uses the page's keywords, and turns them into search-able tags, like those used in content plus. |
|
|
|
 |
alien73

|
Posted:
Sun Jan 18, 2009 2:01 pm |
|
Great idea..
I use this called a Tag Cloud in a block with NOscart..
If a product is called "Fender American Stratocaster Electric Guitar - Blue"
The Tag Cloud would say.
Also search for
Fender, American, Stratocaster, Electric, Guitar, Blue
Each keyword has a link to the search.... WEB 2.0 all the way. |
|
|
|
 |
kguske

|
Posted:
Mon Jan 19, 2009 6:13 am |
|
I last touched that code in April 2008, before focusing on RNYA and RN 2.3. But I'll send you what I have as soon as possible. |
|
|
|
 |
alien73

|
Posted:
Mon Jan 19, 2009 8:29 am |
|
|
|
 |
horrorcode
Involved


Joined: Jan 17, 2009
Posts: 272
Location: Missouri
|
Posted:
Sat Jan 31, 2009 5:18 pm |
|
Hi I was just wondering if there was an update on when there might be a beta release? Just wishful thinking but I'd love to help test it out |
|
|
|
 |
floppydrivez
Involved


Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi
|
Posted:
Sun Feb 01, 2009 7:12 pm |
|
I have already made this mod on www.clan-themes.co.uk that works directly from a specialty version of dynamic titles. I used the same technology to make a tag cloud for articles which I no longer use. I think Guardian first got me working on the idea. Mine uses a simple class & function to determine the keywords. I guess storing them in a database might make it a little more custom, but I never took that step.
I think the hardest part is tackling forum post where terms are not repeated commonly per post. Same for some other modules like content. It is something I need to work on perfecting some more. I haven't looked at it closely in what seems like a very long time. |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Feb 02, 2009 1:18 am |
|
This will always be a sticky one to tackle I think and I would have to agree with kguske that a hybrid approach is definitely the right long term method to use.
In essence, the meta data needs to be generated dynamically from the page content but there needs to be a way to override the data extracted and to be able to store it in a table.
There are a number of Classes and JS tools one can use to dynamically create keywords for example, based on a pages content. The majority of these rely on parsing the page after it has finished loaded and performing a simply calculation on the number of word or phrase repetitions.
The downside of course is that they produce generally un-editable meta data and can be resource hungry.
My own nirvana would like to see something similar to that whereby, the initial meta data is generated automatically based on some configurable settings (amount of single keywords, amount of repeated two word key phrases, max number of 'words' etc) and then store that data in a table to be used as the baseline for further editing at any time.
Of course some mechanism would have to exist to stop the dynamic 'scan' of the page if meta data is already available to save resources. |
|
|
|
 |
|