Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Thu May 08, 2008 2:43 pm Reply with quote

Nice work on the Nuke Docs v1 beta for RavenNuke™ Cool
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 Smile

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...
View user's profile Send private message Visit poster's website
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 727

PostPosted: Fri May 09, 2008 12:56 am Reply with quote

Here are the googe tap rules..

GT-Docs.php
Code:

<?php

$urlin = array(
  '"(?<!/)modules.php\?name=Docs&amp;do=show_doc&amp;id=([0-9]*)&amp;edit_doc=([0-9]*)"',
  '"(?<!/)modules.php\?name=Docs&amp;do=show_doc&amp;id=([0-9]*)&amp;cat=([0-9]*)"',
  '"(?<!/)modules.php\?name=Docs&amp;do=show_doc&amp;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 Smile
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Fri May 09, 2008 5:21 am Reply with quote

sweet man thanks Smile

btw, i also noticed it did it with more than 9 "no parent" pages..
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Mon May 12, 2008 3:17 pm Reply with quote

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;
   }
}
View user's profile Send private message Visit poster's website
Guardian
Mr. Awesome



Joined: Dec 09, 2006
Posts: 240

PostPosted: Mon May 12, 2008 11:41 pm Reply with quote

Wow, great team work Smile

_________________
Code Authors Nuke Reviews
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Tue May 13, 2008 9:13 am Reply with quote

lol, thanks for unbanning me 2x times Embarassed
Guess I wont try to post this one Rolling Eyes 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 Smile
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Tue May 13, 2008 12:19 pm Reply with quote

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 Smile

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 Smile
View user's profile Send private message Visit poster's website
Guardian
Mr. Awesome



Joined: Dec 09, 2006
Posts: 240

PostPosted: Tue May 13, 2008 7:51 pm Reply with quote

You might want to post this over a t nukeseo.com too Wink

_________________
Code Authors Nuke Reviews
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 727

PostPosted: Tue May 13, 2008 9:11 pm Reply with quote

spasticdonkey, very nice work!
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Wed May 14, 2008 2:59 pm Reply with quote

Well I was tinkering some more and was able to add the doc titles to the URL's for Nuke Docs v1 - following the same logic you did with your forums Smile
http://nukecoder.com/ftopict-366-Forum_Topic_Titles_in_URL_with_GoogleTap.html

But cant for the life of me figure out how to get the Sitemap and Feeds to use those URL's Sad

Maybe I'll come back to it later Smile
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Nov 07, 2007
Posts: 8

PostPosted: Sat May 17, 2008 9:37 am Reply with quote

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:
 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:
 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:
 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&amp;do=show_doc&amp;id=".$catInfo[0].$cat_append."\">$title</a>  ($numrows3 pages)


Change to:
Code:

<a href=\"modules.php?name=$module_name&amp;do=show_doc&amp;id=".$catInfo[0].$cat_append."&amp;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

 $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(?!&)"' 


 $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) :)
View user's profile Send private message Visit poster's website
elkingkong
Newbie
Newbie



Joined: May 20, 2008
Posts: 3
Location: San Diego, Ca

PostPosted: Fri Jun 13, 2008 5:49 am Reply with quote

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. Very Happy

Thanks
View user's profile Send private message
Guardian
Mr. Awesome



Joined: Dec 09, 2006
Posts: 240

PostPosted: Fri Jun 13, 2008 7:05 am Reply with quote

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 Smile

_________________
Code Authors Nuke Reviews
View user's profile Send private message
elkingkong
Newbie
Newbie



Joined: May 20, 2008
Posts: 3
Location: San Diego, Ca

PostPosted: Sat Jun 14, 2008 4:05 pm Reply with quote

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?
View user's profile Send private message
Guardian
Mr. Awesome



Joined: Dec 09, 2006
Posts: 240

PostPosted: Sat Jun 14, 2008 7:46 pm Reply with quote

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
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You can post new topics in this forum
You can 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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT + 10 Hours
Forums ©