| Author |
Message |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Wed May 07, 2008 11:43 pm |
|
Nice work on the Nuke Docs v1 beta for RavenNukeâ„¢
Very easy to use, like the approach you took with it..
Is there a GoogleTap available for it (noticed it was tapped here) ?
A "Dynamic Titles" hack would be cool too
Only bug I have seen is if you try to "parent" more than 9 pages to a page the order of the items gets jumbled up... |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 894
|
Posted:
Thu May 08, 2008 9:56 am |
|
Here are the googe tap rules..
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'
);
?>
|
And for the .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]
|
Yeah, there are a couple of bugs I'd like to fix when I get a chance and that is one of them. Glad you find it useful  |
| |
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Thu May 08, 2008 2:21 pm |
|
sweet man thanks
btw, i also noticed it did it with more than 9 "no parent" pages.. |
| |
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Mon May 12, 2008 12:17 am |
|
For those that use montego's dynamic titles I figured out something that works for that... add to includes/dynamic_titles.php
| Code: |
/*
* docs
*/
elseif ($name == 'Docs') {
global $do, $id;
if ($do == 'show_doc') {
$sql = 'SELECT title, subtitle FROM ' . $prefix . '_docs WHERE id=\'' . intval($id) . '\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$newpagetitle = $row['title'] . $dt_sDelim . $row['subtitle'] . $dt_sDelim . $sitename;
}
} |
|
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 326
|
Posted:
Mon May 12, 2008 8:41 am |
|
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Mon May 12, 2008 6:13 pm |
|
lol, thanks for unbanning me 2x times
Guess I wont try to post this one but also figured out an addon for one module I find very cool, the nukeSEO sitemap. This will add the Nuke Docs v1 beta for RavenNukeâ„¢ to the sitemap dynamically. Just upload the php file as modules/Sitemap/content/Docs.php
Cant seem to post the code so here's a zip file
http://www.rtsforce.com/files/Docs.zip
Don't forget! If you use shortlinks you'll have to add to your GT-Sitemap and GT-SitemapGoogle  |
| |
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Mon May 12, 2008 9:19 pm |
|
Well on a roll here I guess, might as well setup feeds for Nuke Docs v1 beta for RavenNukeâ„¢ too. Got it running in nukeFEED, seemed to work just fine
You can setup feeds of most popular / recent from:
The Module Level to select from all docs
or
The Category Level for most popular / recent from a specific doc.
Just add Docs.php from archive below to includes/nukeSEO/content/ and setup in the nukeFEED ACP as you would any other feed....
http://www.rtsforce.com/files/nukeFEED-Docs.zip
Don't forget! If you use shortlinks you'll have to add to your GT-Feeds.php  |
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 326
|
Posted:
Tue May 13, 2008 4:51 am |
|
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 894
|
Posted:
Tue May 13, 2008 6:11 am |
|
spasticdonkey, very nice work! |
| |
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Tue May 13, 2008 11:59 pm |
|
|
|
 |
spasticdonkey

Joined: Nov 07, 2007
Posts: 10
|
Posted:
Fri May 16, 2008 6:37 pm |
|
Well with the importance of getting keywords in your URL's, I thought it would be a good fit for this module.. So I took the same logic nukecoder used here (for a forums url mod):
http://nukecoder.com/ftopict-366-Forum_Topic_Titles_in_URL_with_GoogleTap.html
and applied it to the Nuke Docs v1. Here it is if you are interested...
This will show you how to get Document titles into your Google Tapped links for the Nuke Docs v1 beta for RavenNuke. The rewrites are based on Shortlinks, released with RavenNuke, and may need modification for other versions. Backup your files before making any changes.
Files to edit: 3
Difficulty: Easy
Open -> modules/Docs/index.php
Find (twice):
| Code: |
include("header.php");
|
After, ADD on a new line:
| php: |
function gt_url($url_in)
{
$url_in = trim(str_replace(array('exec', 'union', '.'), '', $url_in));
$url_out = preg_replace('/[^a-z0-9_\-\.]/i', '_', $url_in);
unset($url_in);
return preg_replace('/[_]{2,}/', '_', $url_out);
}
|
Find:
| php: |
echo '<div style="margin-left:'.($item['level'] * 8).'px;"><a href="modules.php?name=Docs&do=show_doc&id='.$item['id'].'" title="">'.$i.$appnd.'. '.$item['title'].'</a></div>';
|
Change to:
| php: |
echo '<div style="margin-left:'.($item['level'] * 8).'px;"><a href="modules.php?name=Docs&do=show_doc&id='.$item['id'].'&title='.gt_url($item['title']).'" title="'.$item['title'].'">'.$i.$appnd.'. '.$item['title'].'</a></div>';
|
Find:
| Code: |
<a href=\"modules.php?name=$module_name&do=show_doc&id=".$catInfo[0].$cat_append."\">$title</a> ($numrows3 pages)
|
Change to:
| Code: |
<a href=\"modules.php?name=$module_name&do=show_doc&id=".$catInfo[0].$cat_append."&title=".gt_url($title)."\" title=\" $title\"> $title</a> ($numrows3 pages)
|
End -> modules/Docs/index.php
_______________________________________
Open -> .htaccess
Add the following rewrite rules to your .htaccess:
| Code: |
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]*)-([A-Za-z0-9_-]*).html modules.php?name=Docs&do=show_doc&id=$1&title=$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]
|
End -> .htaccess
_______________________________________
Open/Create -> Shortlinks/GT-Docs.php
| 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]*)&title=([a-zA-Z0-9-_]*)"',
'"(?<!/)modules.php\?name=Docs&do=show_doc&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Docs(?!&)"'
|
| php: |
$urlout = array(
'document-\\1-edit-\\2.html',
'document-\\1-cat-\\2.html',
'document-\\1-\\2.html',
'document-\\1.html',
'documents.html'
|
Save and close all files.
End Mod.
now your document urls will include titles, like so:
document-36-Your_Page_Title_Full_of_Awesome_Keywords_Deluxe.html
(also adds title tags to the document links)
Have yet to figure out how to get nukeFEED or the nukeSEO sitemap to recognize these urls, but thought I would go ahead and share (hope to figure it out at some point) :) |
| |
|
|
 |
elkingkong

Joined: May 20, 2008
Posts: 3
Location: San Diego, Ca
|
Posted:
Thu Jun 12, 2008 2:49 pm |
|
I really like Nuke Docs v1 beta for RavenNuke™. It’s a great module and it has a lot of potential. I can see it becoming a standard in nuke distributions. It has many applications; it can be used to create Tutorials, User Manuals, Content, and possibly Wiki’s.
Spasticdonkey reported a bug
| spasticdonkey wrote: |
Only bug I have seen is if you try to "parent" more than 9 pages to a page the order of the items gets jumbled up... |
and
| spasticdonkey wrote: |
btw, i also noticed it did it with more than 9 "no parent" pages.. |
I verified those same bugs. I really want to use this module but this bug would severely limit me, and the whole nuke community, on the size of the tutorials and/or manuals we could write. So before I dive in and adopt this module, any ideas of when you would be able to take a look at these issues?
I also have some suggestions on features that would go great with Nuke Docs v1 beta for RavenNuke™ but I don’t want to sound too overbearing so I will save them for later.
Thanks |
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 326
|
Posted:
Thu Jun 12, 2008 4:05 pm |
|
Well I AM over bearing and I have been using this for a while - it's great!!
The only thing I would like to see is GESHI built in - that would enable it to become a world first, fantastic tool for writing tut's and other code based snippets.
gotcha seems to be on a bit of a roll with 'firsts' so let's wait and see  |
_________________ Code Authors Nuke Reviews |
|
|
 |
elkingkong

Joined: May 20, 2008
Posts: 3
Location: San Diego, Ca
|
Posted:
Sat Jun 14, 2008 1:05 am |
|
Ok, I guess it’s later now so here are my suggestions.
I would like to see Nuke Docs v1 beta for RavenNukeâ„¢ have a group and subgroup option. I am planning on writing tutorials and manuals; having the option to put them in groups would be awesome! And if those groups and subgroup also had the option of individually restricting access to only registered users that would be awesomer!!
There is a module out there that already has these functions, I believe you know it; it’s NSN GR Downloads by nukescripts.net. Would it be taboo to hollow it out and wrap it around Nuke Docs v1 beta for RavenNuke™? I only suggest this because 1) it’s a great idea and 2) the code is already written.
What do you think? |
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 326
|
Posted:
Sat Jun 14, 2008 4:46 am |
|
I believe Bob is re-writing NSN Groups so the way 'groups' access rights are handled is likely to change so I would be tempted to hang on a bit. |
_________________ Code Authors Nuke Reviews |
|
|
 |
|
|