PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Mon Feb 02, 2009 6:06 pm Reply with quote Back to top

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 to the forums!



Only registered users can see links on this board!
Get registered or login to the forums!



Only registered users can see links on this board!
Get registered or login to the forums!





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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Mon Feb 02, 2009 11:49 pm Reply with quote Back to top

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&amp;mid='.$id;
   }
}
?>


Last edited by kguske on Tue Feb 03, 2009 8:34 am; edited 1 time in total
View user's profile Send private message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Feb 03, 2009 2:35 am Reply with quote Back to top

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 to the forums!


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 Sad

EDIT: and it appears to be a drupal based site.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Feb 03, 2009 6:08 am Reply with quote Back to top

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
View user's profile Send private message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Feb 03, 2009 6:56 am Reply with quote Back to top

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 '%%'))
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Feb 03, 2009 8:35 am Reply with quote Back to top

Try adding:
Code:
      $this->sql_col_author        = '"none"';

After
Code:
      $this->sql_col_desc          = 'content';

as I did in the edited version above.
View user's profile Send private message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Feb 03, 2009 4:01 pm Reply with quote Back to top

lol, I couldnt help but laugh

Code:

Unknown column '"none"' in 'field list'
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Feb 03, 2009 4:15 pm Reply with quote Back to top

It should treat that as a constant (and this works in other content classes).
View user's profile Send private message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Feb 03, 2009 4:21 pm Reply with quote Back to top

not sure.

i just tried changing it to another field e.g. date and it worked.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum