Author |
Message |
testy1
Involved


Joined: Apr 06, 2008
Posts: 484
|
Posted:
Mon Feb 02, 2009 6:06 pm |
|
I setup nukeseo sitemap on RN2.3 and want to add a content class for a custom module.The custome module is just a modified version of the message's module included with RN.Basically there is an admin panel for creating the pages and it will give you a link to view the page.
see the example code and screenshots below
Code:
DROP TABLE IF EXISTS `nuke_nukepages`;
CREATE TABLE `nuke_nukepages` (
`mid` int(11) NOT NULL AUTO_INCREMENT,
`pagelink` varchar(20) NOT NULL DEFAULT '',
`title` varchar(100) NOT NULL DEFAULT '',
`content` text NOT NULL,
`date` varchar(14) NOT NULL DEFAULT '',
`expire` int(7) NOT NULL DEFAULT '0',
`active` int(1) NOT NULL DEFAULT '1',
`view` int(1) NOT NULL DEFAULT '1',
`groups` text NOT NULL,
`mlanguage` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`mid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `nuke_nukepages`
--
INSERT INTO `nuke_nukepages` VALUES(1, 'MyPage', 'My Custom Page', 'Some content for the page', '1233563097', 0, 1, 1, '', '');
|
The link is formated like so
modules.php?name=nukepages&op=pages&pagelink=MyPage
And here is some screenshots of the process to give you a better understanding.
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login!
I have tried a couple of times but I think the issue is related to the page not being called by an ID number but instead a name, Anyone able to help with this one. |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Feb 02, 2009 11:49 pm |
|
You need to either change the URL to also include the mid or replace the pagelink with the mid. The sitemap doesn't currently support additional variable parameters other than the ID. If you add the mid to the URL (e.g. &mid=13 in your example), you could use the following (save as modules/Sitemap/content/nukepages.php
Code:<?php
#########################################################################
# nukeSEO Copyright (c) 2005 Kevin Guske http://nukeSEO.com
# Meta Tag function developed by Jens Hauge http://visayas.dk
# Sitemap object approach from mSearch by David Karn http://webdever.net
# Submit Sitemap from phpSitemapNG by Tobias Kluge http://enarion.net
# Results originally developed by Curve2 Design http://curve2.com
#########################################################################
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
#########################################################################
if(!defined('ADMIN_FILE') and !defined('MODULE_FILE')) { header("Location: ../../../index.php"); die(); }
class seonukepages extends searchmodule {
function seonukepages (){
global $prefix;
$this->name = 'nukepages';
$this->module = 'nukepages';
$this->sql_col_time = 'date';
$this->sql_col_title = 'title';
$this->sql_col_id = 'mid';
$this->sql_col_desc = 'content';
$this->sql_col_author = '"none"';
$this->sql_table_with_prefix = $prefix.'_nukepages';
$this->sql_where_cols = array('title',
'content');
}
function buildlink($id){
return '?name=nukepages&op=pages&pagelink=MyPage&mid='.$id;
}
}
?>
|
|
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
Last edited by kguske on Tue Feb 03, 2009 8:34 am; edited 1 time in total |
|
|
 |
testy1

|
Posted:
Tue Feb 03, 2009 2:35 am |
|
Thanks for spending the time to do that, I will change it to mid
on a different note, But SEO related, I was surprised to see that after searching google for "Computer Repair"
Only registered users can see links on this board! Get registered or login!
It showed supergeek as the number one spot.After looking at the source code I noticed they dont have meta keywords or a description, Which makes me wonder how important they are
EDIT: and it appears to be a drupal based site. |
|
|
|
 |
kguske

|
Posted:
Tue Feb 03, 2009 6:08 am |
|
Keywords are so important any more, at least not to Google - but title and description are very important. Other search engines might still find keywords useful. If you think about it, unfortunately, it's a game and the rules keep changing |
|
|
|
 |
testy1

|
Posted:
Tue Feb 03, 2009 6:56 am |
|
for some reason I keep getting the error
Code:
Unknown column '' in 'field list'
|
here's what is happening
Code:
INSERT INTO nuke_sitemap_476 (`id`, `relevance`, `date`, `title`, `rid`, `desc`, `author`, `searchmodule`) SELECT CONCAT("nukepages", `mid`) AS `id`, '1', UNIX_TIMESTAMP(`date`), `title`, `mid`, `content`, ``, "nukepages" FROM nuke_nukepages WHERE ((title like '%%') OR (`content` like '%%'))
|
|
|
|
|
 |
kguske

|
Posted:
Tue Feb 03, 2009 8:35 am |
|
Try adding:
Code: $this->sql_col_author = '"none"';
|
After
Code: $this->sql_col_desc = 'content';
|
as I did in the edited version above. |
|
|
|
 |
testy1

|
Posted:
Tue Feb 03, 2009 4:01 pm |
|
lol, I couldnt help but laugh
Code:
Unknown column '"none"' in 'field list'
|
|
|
|
|
 |
kguske

|
Posted:
Tue Feb 03, 2009 4:15 pm |
|
It should treat that as a constant (and this works in other content classes). |
|
|
|
 |
testy1

|
Posted:
Tue Feb 03, 2009 4:21 pm |
|
not sure.
i just tried changing it to another field e.g. date and it worked. |
|
|
|
 |
|