| Author |
Message |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Thu Jul 22, 2010 9:11 am |
|
For anyone interested heres the tap for
Nuke Docs v1 beta for RavenNuke
http://www.nukecoder.com/shop_item-12.html
ShortLinks/GT-Docs.php
| Code: |
<?php
$urlin = array(
'"(?<!/)modules.php\?name=Docs&do=show_doc&id=([0-9]*)&edit_doc=([0-9]*)"',
'"(?<!/)modules.php\?name=Docs&do=show_doc&id=([0-9]*)&cat=([0-9]*)"',
'"(?<!/)modules.php\?name=Docs&do=show_doc&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Docs(?!&)"'
);
$urlout = array(
'document-\\1-edit-\\2.html',
'document-\\1-cat-\\2.html',
'document-\\1.html',
'documents.html'
);
?> |
htaccess
| Code: |
#Docs
RewriteRule ^document-([0-9]*)-edit-([0-9]*).html modules.php?name=Docs&do=show_doc&id=$1&edit_doc=$2 [L]
RewriteRule ^document-([0-9]*)-cat-([0-9]*).html modules.php?name=Docs&do=show_doc&id=$1&cat=$2 [L]
RewriteRule ^document-([0-9]*).html modules.php?name=Docs&do=show_doc&id=$1 [L]
RewriteRule ^documents.html modules.php?name=Docs [L] |
|
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Thu Jul 22, 2010 9:36 am |
|
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Fri Jul 23, 2010 4:38 am |
|
Many thanks Spastic, I will probably add these to my site as I use the Docs module to show screen shots and installation instructions for various modules. |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Fri Jul 23, 2010 10:16 am |
|
cool
while not shortlink related here's a some other Nuke Docs stuff..
nukeDH file
includes/nukeSEO/dh/dhDocs.php
| Code: |
<?php
/************************************************************************/
/* nukeSEO
/* http://www.nukeSEO.com
/* Copyright (c) 2009 by Kevin Guske
/************************************************************************/
/* 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. */
/************************************************************************/
class dhDocs extends dhclass {
function dhDocs () {
global $prefix;
$this->content_id = 'id';
$this->content_table = $prefix.'_docs';
$this->contentTitleArray = array('title', 'subtitle');
$this->contentDescArray = array('text');
$this->contentKeysArray = array('title', 'subtitle','text');
$this->cat_id = 'cat';
$this->cat_table = $prefix.'_nuke_docs_categories';
$this->catTitleArray = array('title');
$this->catDescArray = array('description');
$this->catKeysArray = array('title','description');
// If pending content is stored in the same table, inactive content, private content, etc.
$this->activeWhere = '';
}
function getContentID() {
global $id;
return $id;
}
function setContentID() {
global $id, $dhID;
$id = $dhID;
}
function getCatID() {
global $cat;
return $cat;
}
function setCatID() {
global $cat, $dhCat;
$cat = $dhCat;
}
}
?> |
nukeFEED
includes/nukeSEO/content/Docs.php
| Code: |
<?php
/************************************************************************/
/* nukeFEED
/* http://www.nukeSEO.com
/* Copyright © 2007 by Kevin Guske
/************************************************************************/
/* 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 (stristr(htmlentities($_SERVER['PHP_SELF']), 'Docs.php')) {
Header('Location: ../../../index.php');
die();
}
class seoDocs extends seocontentclass
{
function seoDocs ()
{
global $prefix;
$this->name = 'Docs';
$this->sql_col_id = 'id';
$this->sql_col_title = 'title';
$this->sql_col_desc = 'text';
$this->sql_col_time = 'date';
$this->sql_col_catid = 'cat';
$this->sql_col_author = 'subtitle';
$this->sql_table_with_prefix = $prefix.'_docs';
$this->sql_where_cols = array
(
'title',
'subtitle',
'text'
);
$this->activeWhere = '';
$this->orderArray = array
(
'recent' => 'recent',
'popular' => 'popular'
);
$this->orderSQLArray = array
(
'recent' => 'id DESC',
'popular' => 'counter DESC'
);
$this->levelArray = array
(
'category' => 'category'
);
$this->levelSQLArray = array(
'category' => 'cat',
);
}
function getLink($id, $cat)
{
return getNukeURL().'modules.php?name=Docs&do=show_doc&id='.$id;
}
}
?> |
nukeSEO Sitemap
modules/Sitemap/content/Docs.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 seoDocs extends searchmodule {
function seoDocs (){
global $prefix;
$this->name = 'Docs';
$this->module = 'Docs';
$this->sql_col_time = 'date';
$this->sql_col_title = 'title';
$this->sql_col_id = 'id';
$this->sql_col_desc = 'text';
$this->sql_col_author = 'subtitle';
$this->sql_table_with_prefix = $prefix.'_docs';
$this->sql_where_cols = array('title',
'subtitle',
'text');
}
function formatGoogleResult($result){
global $url;
return $this->formatGoogleURL($url['scheme'].'://'.$url['host'].$url['path'].'?name=Docs&do=show_doc&id='.$result['rid']);
}
function formatSitemapResult($result){
if (!trim($result['title'])){
$result['title'] = 'View Result';
}
return '<a href="modules.php?name=Docs&do=show_doc&id='.$result['rid'].'" title="'.chopwords(strip_tags($result['desc']),192).'">'.$result['title'].'</a>';
}
}
?> |
|
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sat Jul 24, 2010 10:32 am |
|
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Sat Jul 24, 2010 10:39 am |
|
Above and beyond, thanks a lot! |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Sun Jul 25, 2010 2:16 pm |
|
noticed a small error in the DH file above.. the cat_table should be _docs_categories NOT nuke_docs_categories ....
| Code: |
<?php
class dhDocs extends dhclass {
function dhDocs () {
global $prefix;
$this->content_id = 'id';
$this->content_table = $prefix.'_docs';
$this->contentTitleArray = array('title', 'subtitle');
$this->contentDescArray = array('text');
$this->contentKeysArray = array('title', 'subtitle','text');
$this->cat_id = 'cat';
$this->cat_table = $prefix.'_docs_categories';
$this->catTitleArray = array('title');
$this->catDescArray = array('description');
$this->catKeysArray = array('title','description');
// If pending content is stored in the same table, inactive content, private content, etc.
$this->activeWhere = '';
}
function getContentID() {
global $id;
return $id;
}
function setContentID() {
global $id, $dhID;
$id = $dhID;
}
function getCatID() {
global $cat;
return $cat;
}
function setCatID() {
global $cat, $dhCat;
$cat = $dhCat;
}
}
?> |
|
| |
|
|
 |
kguske
Newbie


Joined: Dec 11, 2005
Posts: 28
|
Posted:
Fri Aug 13, 2010 1:04 pm |
|
Just noticed this. Cool....! |
_________________ nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Tue Aug 17, 2010 10:10 pm |
|
one last pointer regarding this module, it has a bug sorting any more than 10 documents under a parent document.
function getRecursive
modules/Docs/index.php
| Code: |
| $csql = "SELECT id, cat, parent, title FROM ".$prefix."_docs WHERE parent='$id' AND cat='$parent_cat_id' ".$active." ORDER BY parent ASC"; |
it's selecting all documents where parent=$id, so all results will have the same parent. Then it's also stating to ORDER BY parent, when the parent for all results is the same. I changed to:
| Code: |
| $csql = "SELECT id, cat, parent, title FROM ".$prefix."_docs WHERE parent='$id' AND cat='$parent_cat_id' ".$active." ORDER BY id ASC"; |
which at least keeps them in the order they were created... no other way to sort them w/o modifying ... |
| |
|
|
 |
|
|