| Author |
Message |
floppy
Newbie


Joined: Sep 11, 2006
Posts: 92
|
Posted:
Mon Oct 09, 2006 12:23 pm |
|
It too me a while to hunt this up on the web here it is with a few minor corrections.
GT-Downloads.php
| Code: |
$urlin = array(
"'(?<!/)modules.php\?name=Downloads&d_op=ns_dl_rec_dl&cid=([0-9]*)&lid=([0-9]*)&ttitle=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=ns_dl_send_rec'",
"'(?<!/)modules.php\?name=Downloads&d_op=ns_dl_get_mirror_two&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=ns_dl_get_mirror_one&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=viewdownloaddetails&cid=([0-9]*)&lid=([0-9]*)&ttitle=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=viewdownloadcomments&cid=([0-9]*)&lid=([0-9]*)&ttitle=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=modifydownloadrequest&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=brokendownload&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=NewDownloads&newdownloadshowdays=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=NewDownloadsDate&selectdate=([a-zA-Z0-9+]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=getit&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=ratedownload&cid=([0-9]*)&lid=([0-9]*)&ttitle=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=ratedownload&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=(TopRated|MostPopular)&ratenum=([0-9]*)&ratetype=(num|percent)'",
"'(?<!/)modules.php\?name=Downloads&d_op=(AddDownload|NewDownloads|MostPopular|TopRated)'",
"'(?<!/)modules.php\?name=Downloads&d_op=viewdownload&cid=([0-9]*)&orderby=([a-zA-Z0-9+]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=viewdownload&cid=([0-9]*)&min=([0-9]*)&orderby=([a-zA-Z0-9+]*)&show=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=search&query=([/:\-\'{}()\,\._&a-zA-Z0-9+=]*)&min=([0-9]*)&orderby=([a-zA-Z0-9+]*)&show=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=search&query=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)&orderby=([a-zA-Z0-9+]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=search'",
"'(?<!/)modules.php\?name=Downloads&d_op=outsidedownloadsetup&lid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=viewdownload&cid=([0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&file=ns_uploads_file&type=file'",
"'(?<!/)modules.php\?name=Downloads&d_op=gfx&random_num=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php\?name=Downloads&d_op=ns_pass_help&thepass=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php\?name=Downloads'"
);
$urlout = array(
"downloadrecommend-\\1-\\2-\\3.html",
"download-send.html",
"download-file-mirrortwo\\1.html",
"download-file-mirrorone\\1.html",
"downloaddetails-\\1-\\2-\\3.html",
"downloadcomments-\\1-\\2-\\3.html",
"download-mod-\\1.html",
"download-broken-\\1.html",
"download-shownew-\\1.html",
"download-seldate-\\1.html",
"download-file-\\1.html",
"ratedownload-\\1-\\2-\\3.html",
"ratedownload-\\1.html",
"download-\\1-\\2-\\3.html",
"downloads-\\1.html",
"download\\1-orderby\\2.html",
"download\\1-\\2-\\3-\\4.html",
"download-search-\\1-\\2-\\3-\\4.html",
"download-search-\\1-\\2.html",
"download-search.html",
"download-outside-\\1.html",
"downloads-cat\\1.html",
"download-upload.html",
"downloads-gfx-\\1.html",
"downloads-help-\\1.html",
"downloads.html"
); |
.htaccess
| Code: |
#Downloads
RewriteRule ^downloadrecommend-([0-9]*)-([0-9]*)-([[:punct:]/:\-\'(){}.&=_a-zA-Z0-9\ ]*).html modules.php?name=Downloads&d_op=ns_dl_rec_dl&cid=$1&lid=$2&ttitle=$3 [L]
RewriteRule ^download-send.html modules.php?name=Downloads&d_op=ns_dl_send_rec [L]
RewriteRule ^download-file-mirrortwo([0-9]*).html modules.php?name=Downloads&d_op=ns_dl_get_mirror_two&lid=$1 [L]
RewriteRule ^download-file-mirrorone([0-9]*).html modules.php?name=Downloads&d_op=ns_dl_get_mirror_one&lid=$1 [L]
RewriteRule ^downloaddetails-([0-9]*)-([0-9]*)-([[:punct:]/:\-\'{}()._&a-zA-Z0-9+=]*).html modules.php?name=Downloads&d_op=viewdownloaddetails&cid=$1&lid=$2&ttitle=$3 [L]
RewriteRule ^downloadcomments-([0-9]*)-([0-9]*)-([[:punct:]/:\-\'{}()._&a-zA-Z0-9+=]*).html modules.php?name=Downloads&d_op=viewdownloadcomments&cid=$1&lid=$2&ttitle=$3 [L]
RewriteRule ^download-mod-([0-9]*).html modules.php?name=Downloads&d_op=modifydownloadrequest&lid=$1 [L]
RewriteRule ^download-broken-([0-9]*).html modules.php?name=Downloads&d_op=brokendownload&lid=$1 [L]
RewriteRule ^download-shownew-([0-9]*).html modules.php?name=Downloads&d_op=NewDownloads&newdownloadshowdays=$1 [L]
RewriteRule ^download-seldate-([a-zA-Z0-9+]*).html modules.php?name=Downloads&d_op=NewDownloadsDate&selectdate=$1 [L]
RewriteRule ^download-file-([0-9]*).html modules.php?name=Downloads&d_op=getit&lid=$1 [L]
RewriteRule ^ratedownload-([0-9]*)-([0-9]*)-([[:punct:]/:\-\'{}()._&a-zA-Z0-9+=]*).html modules.php?name=Downloads&d_op=ratedownload&cid=$1&lid=$1&ttitle=$2 [L]
RewriteRule ^ratedownload-([0-9]*).html modules.php?name=Downloads&d_op=ratedownload&lid=$1 [L]
RewriteRule ^download-(TopRated|MostPopular)-([0-9]*)-(num|percent).html modules.php?name=Downloads&d_op=$1&ratenum=$2&ratetype=$3 [L]
RewriteRule ^downloads-(AddDownload|NewDownloads|MostPopular|TopRated).html modules.php?name=Downloads&d_op=$1 [L]
RewriteRule ^download([0-9]*)-orderby([a-zA-Z0-9+]*).html modules.php?name=Downloads&d_op=viewdownload&cid=$1&orderby=$2 [L]
RewriteRule ^download([0-9]*)-([0-9]*)-([a-zA-Z0-9+]*)-([0-9]*).html modules.php?name=Downloads&d_op=viewdownload&cid=$1&min=$2&orderby=$3&show=$4 [L]
RewriteRule ^download-search-([[:punct:]/:\-\'{}()._&a-zA-Z0-9+=]*)-([0-9]*)-([a-zA-Z0-9+]*)-([0-9]*).html modules.php?name=Downloads&d_op=search&query=$1&min=$2&orderby=$3&show=$4 [L]
RewriteRule ^download-search-([[:punct:]/:\-\'{}()._&a-zA-Z0-9+=]*)-([a-zA-Z0-9+]*).html modules.php?name=Downloads&d_op=search&query=$1&orderby=$2 [L]
RewriteRule ^download-search.html modules.php?name=Downloads&d_op=search [L]
RewriteRule ^download-outside-([0-9]*).html modules.php?name=Downloads&d_op=outsidedownloadsetup&lid=$1 [L]
RewriteRule ^downloads-cat([0-9]*).html modules.php?name=Downloads&d_op=viewdownload&cid=$1 [L]
RewriteRule ^download-upload.html modules.php?name=Downloads&file=ns_uploads_file&type=file [L]
RewriteRule ^downloads-gfx-([a-zA-Z0-9+]*).html modules.php?name=Downloads&d_op=gfx&random_num=$1 [L]
RewriteRule ^downloads-help-([a-zA-Z0-9+]*).html modules.php?name=Downloads&d_op=ns_pass_help&thepass=$1 [L]
RewriteRule ^downloads.html m odules.php?name=Downloads [L] |
ADMIN NOTE: Note that the last line above the "m odules.php" should be "modules.php" but it was being re-written with ShortLinks, so be sure to remove the added space if you use these rules!
All seems to be working for me.[/b] |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Mon Oct 09, 2006 2:36 pm |
|
Very nice floppy! Thanks! |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Divvy
Newbie


Joined: Dec 20, 2007
Posts: 5
|
Posted:
Sun Jan 06, 2008 8:43 pm |
|
hummm dont work for me
And I have EDL 2.1 too...
The url /downloads.html is not opening.
I tryed to replace this line:
| Code: |
| RewriteRule ^downloads.html downloads.html [L] |
with the original shortlink line... And it works, but some links is not working... like the download botton in the poll page. And the votation and comments didnt work.
Anyone else with the same problem that can help me?  |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Mon Jan 07, 2008 4:17 am |
|
Have you thought about using RavenNuke or at least patching your site with the latest security patches?
I think you may encounter more problems like this as most add-on modules now use some of the new constants introduced with the security patches.
M I installed Shortlinks for Divvy and used the modified NSN News taps posted here by another user and that seemed to work fairly well. However, it then 'broke' the search function as obviously the links were wrong for 'news' in the search function <sigh>.
I have a feeling this may be because the BLOCK_FILE constant and others are none existent in his virgin version of nuke.
I had to modify mainfile to get the correct references for INCLUDE_PATH but ... |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Mon Jan 07, 2008 6:59 pm |
|
G, wouldn't the search for news not be working because the NSN News tables are different? (Actually, I am guessing that they are different as all the other NSN tools that I have used have used different nuke table names than the core PHP-Nuke.) So, I am not thinking that would have anything to do with the patches or ShortLinks?
Now, if you are seeing that the links are not being properly shortened or are getting 404 errors, that is a different animal. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Tue Jan 08, 2008 2:37 am |
|
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Tue Jan 08, 2008 7:41 am |
|
Well, that is weird and is definitely not a ShortLinks issue as the pattern matching is very specific and not that "greedy", so I guess the search module isn't formatting those links correctly then?
You may have to turn off ShortLinks for awhile while you debug the code just to keep your head from spinning around trying to figure out where in the code the links are being generated from. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 24
|
Posted:
Wed Jan 09, 2008 8:20 am |
|
I think it was me who posted the NSN News Tap and I dont run any virgin Nuke it's patched with the latest patch,and the NSN News do require some modding of the mainfile and blocks,it works like a charm for me and others,the only thing that doesent work is the PDF
O yeah you need to change the Tap for the search module here is mine version
| Code: |
$urlin = array(
'"(?<!/)modules.php\?name=Search&author=([a-zA-Z0-9]*)&topic=([0-9]*)&min=([0-9]*)&query=([a-zA-Z0-9]*)&type=([a-zA-Z]*)&category=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&author=([a-zA-Z0-9]*)&topic=([0-9]*)&min=([0-9]*)&query=([a-zA-Z0-9]*)&type=([a-zA-Z]*)"',
'"(?<!/)modules.php\?name=Search&query=([a-zA-Z0-9]*)&author=([a-zA-Z0-9]*)"',
'"(?<!/)modules.php\?name=Search&type=comments&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&author=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Search&query=&author=([a-zA-Z0-9_-]*)"',
"'(?<!/)modules.php\?name=Search&query=&topic=([0-9]*)'",
'"(?<!/)modules.php\?name=Search"',
'"(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Your_Account&op=([a-z_]*)"',
'"(?<!/)modules.php\?name=News&op=NEArticle&sid=([0-9]*)"'
);
$urlout = array(
'search-\\1-\\2-\\3-\\4-\\5-\\6.html',
'search-\\1-\\2-\\3-\\4-\\5.html',
'search-\\1-\\2.html',
'search-comments-\\1.html',
'search-authors-\\1.html',
'search-authors-\\1.html',
'search-topics-\\1.html',
'search.html',
'userinfo-\\1.html',
'account-\\1.html',
'article-\\1.html'
);
?>
|
ht
| Code: |
# Search
RewriteRule ^search-([a-zA-Z0-9]*)-([0-9]*)-([0-9]*)-([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html modules.php?name=Search&author=$1&topic=$2&min=$3&query=$4&type=$5&category=$6
RewriteRule ^search-([a-zA-Z0-9]*)-([0-9]*)-([0-9]*)-([a-zA-Z0-9]*)-([a-zA-Z]*).html modules.php?name=Search&author=$1&topic=$2&min=$3&query=$4&type=$5
RewriteRule ^search-([a-zA-Z0-9_-]*)-([a-zA-Z0-9_-]*).html modules.php?name=Search&query=$1&author=$2
RewriteRule ^search-comments-([0-9]*).html modules.php?name=Search&type=comments&sid=$1
RewriteRule ^search-authors-([a-zA-Z0-9_-]*).html modules.php?name=Search&author=$1
RewriteRule ^search-authors-([a-zA-Z0-9_-]*).html modules.php?name=Search&query=&author=$1
RewriteRule ^search-topics-([0-9]*).html modules.php?name=Search&query=&topic=$1
RewriteRule ^users.html modules.php?name=Search&type=users
RewriteRule ^search.html search.html [L]
|
And if it is not the tap that I posted here you have that to
ht
| Code: |
# News
RewriteRule ^article-reply-([0-9]*)-([0-9]*).html modules.php?name=News&op=NEReply&pid=$1&sid=$2&mode=$3&order=$4&thold=$5
RewriteRule ^article-comment-([0-9]*)-([0-9]*).html modules.php?name=News&op=NEArticle&thold=-1&mode=flat&order=0&sid=$1#$2
RewriteRule ^article-([0-9]*)-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=News&op=NEArticle&sid=$1&mode=$2&order=$3&thold=$4
RewriteRule ^article-([0-9]*).html modules.php?name=News&op=NEArticle&sid=$1
RewriteRule ^article-print-([0-9]*).html modules.php?name=News&op=NEPrint&sid=$1
RewriteRule ^article-pdf-([0-9]*).html modules.php?name=News&op=NEPortbale&sid=$1
RewriteRule ^article-send-([0-9]*).html modules.php?name=News&op=NEFriend&sid=$1
RewriteRule ^article-sent-([0-9]*).html modules.php?name=News&op=NEFriendSent&sid=$1 [L]
RewriteRule ^article-category-([0-9]*).html modules.php?name=News&op=NECategoryList&catid=$1
RewriteRule ^article-topic-([0-9]*).html modules.php?name=News&new_topic=$1
RewriteRule ^article-popup-([0-9]*).html modules.php?name=News&op=NERead&sid=$1
RewriteRule ^article-rating-done-([0-9]*)-([0-9]*).html modules.php?name=News&op=NERateDone&sid=$1&rated=$2
RewriteRule ^article-rating-done-([0-9]*).html modules.php?name=News&op=NERateDone&sid=$1
RewriteRule ^article-rating.html modules.php?name=News&op=NERate
RewriteRule ^article.html modules.php?name=News&op=NEIndex [L]
RewriteRule ^news.html news.html [L]
|
| Code: |
$urlin = array(
'"(?<!/)modules.php\?name=News&op=NEReply&pid=([0-9]*)&sid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEMonth&year=([0-9]*)&month=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEArchive"',
'"(?<!/)modules.php\?name=News&op=NEAll"',
'"(?<!/)modules.php\?name=News&op=NEArticle&thold=-1&mode=flat&order=0&sid=([0-9]*)#([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEArticle&sid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEArticle&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEPrint&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEPortable&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEFriend&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NEFriendSent&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NECategoryList&catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&new_topic=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NERead&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NERateDone&sid=([0-9]*)&rated=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NERateDone&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NERate"',
'"(?<!/)modules.php\?name=News&op=NETopics&topic=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=NETopicMain"',
'"(?<!/)modules.php\?name=News&op=NEIndex"',
'"(?<!/)modules.php\?name=News"',
'"(?<!/)modules.php\?name=Search&type=comments&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&author=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Search&topic=([0-9]*)"',
'"(?<!/)modules.php\?name=Private_Messages&mode=post&u=([0-9]*)"',
'"(?<!/)modules.php\?name=Journal&op=([a-zA-Z0-9_-]*)&([a-zA-Z0-9_-]*)=([0-9]*)"',
'"(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Your_Account&op=([a-z_]*)"',
'"(?<!/)modules.php\?name=Your_Account"',
'"(?<!/)modules.php\?name=Surveys&op=results&pollID=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([0-9\-]*)"',
'"(?<!/)modules.php\?name=Surveys"',
'"(?<!/)\?gfx=gfx&random_num=([0-9]*)"'
);
$urlout = array(
'article-reply-\\1-\\2.html',
'archive-\\1-\\2.html',
'archive.html',
'archive-all.html',
'article-comment-\\1-\\2.html',
'article-\\1-\\2-\\3-\\4.html',
'article-\\1.html',
'article-print-\\1.html',
'article-pdf-\\1.html',
'article-send-\\1.html',
'article-sent-\\1.html',
'article-category-\\1.html',
'article-topic-\\1.html',
'article-popup-\\1.html',
'article-rating-done-\\1-\\2.html',
'article-rating-done-\\1.html',
'article-rating.html',
'topics-\\1.html',
'topics.html',
'article.html',
'news.html',
'search-comments-\\1.html',
'search-authors-\\1.html',
'search-topics-\\1.html',
'messages-post-\\1.html',
'journal-\\1-\\2-\\3.html',
'userinfo-\\1.html',
'account-\\1.html',
'account.html',
'survey-results-\\1-\\2-\\3-\\4.html',
'surveys.html',
'gfx-\\1.html'
);
?>
|
|
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Wed Jan 09, 2008 9:25 am |
|
Wow, thanks for that Kenny, I am sure that will come in useful for many  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Wed Jan 09, 2008 11:35 pm |
|
I think this might have been the original reference:
http://montegoscripts.com/ftopict-108.html |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Tue Feb 24, 2009 10:54 pm |
|
NEArticle, NECategoryList ????? |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Wed Mar 04, 2009 9:04 pm |
|
|
|
 |
w2ibc
Newbie


Joined: Jul 14, 2009
Posts: 14
|
Posted:
Sun Oct 25, 2009 4:03 pm |
|
i noticed in the original post
in htaccess
RewriteRule ^downloads.html downloads.html [L]
should be
RewriteRule ^downloads.html downloads.html [L]
otherwise when going to the downloads it gives a 404 error (at least it did me, untill i changed that) |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Sun Oct 25, 2009 4:24 pm |
|
@ w2ibc the lines you psted look the same to me, it's possible they are getting re-written in the forum here.
@ xitetuan - those are function for NSN News if I'm not mistaken |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sun Oct 25, 2009 5:03 pm |
|
I have fixed the original post due to the ShortLinks rewriting of the modules.php link. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|