Author |
Message |
pureliving
Worker


Joined: Dec 01, 2008
Posts: 180
|
Posted:
Sun Mar 01, 2009 3:39 pm |
|
When the installation of a new module is input into RN what is required to do to make it shortlinks compliant?
Any advice would really be appreciated.
xx Bless xx |
|
|
|
 |
trunks
Worker


Joined: Oct 05, 2007
Posts: 152
Location: United Kingdom
|
Posted:
Sun Mar 01, 2009 4:18 pm |
|
well it would have to be added to the shortlinks... browes the forums search option for the relevant posts as i believe there are already some with the information you require.
 |
|
|
|
 |
pureliving

|
Posted:
Sun Mar 01, 2009 5:54 pm |
|
Yes i understand that i would need a GT-*******.php file, and the rewrite rules to the ShortLinks.htaccess file, but what i am not quite sure of is what to look for or what to write to create these; if i were to write them from new for a new added module, or if i would require any additional shortlink coding to be added to my added module, and if so what?
Is there any instruction manual on how to do this at all, as it would really be appreciated, because it would be more appropriate to know how to include the ability for third-party modules to shorten links for the search engines, e.g. SEO.
xx Bless xx |
|
|
|
 |
trunks

|
Posted:
Sun Mar 01, 2009 6:01 pm |
|
well look at your module you have and compare with the existing modules that are alreay there for both the GT-*******.php file's and the .htaccess file.
if you can tell us more about your module some of us may be able to healp you further  |
|
|
|
 |
pureliving

|
Posted:
Sun Mar 01, 2009 6:12 pm |
|
There is no specific module at the moment that i wish to mention, although several are on my agenda, and as i have for the first time upgraded my website myself, my inquisitive grows further.
So to reference this ability during my learning and testing days, i want to ensure i have ready what would be correct for a new module, so it can work with shortlinks and the search engines.
I have noticed recently abit about rewrite rules and Taps being written for a given module, but i still don't understand what url's i need to input to be shortened on rewrite or what url's need shortening for urlin and urlout arrays.
Do you or anyone have any further advise please.
xx bless xx |
|
|
|
 |
trunks

|
Posted:
Sun Mar 01, 2009 6:55 pm |
|
Well unless we have the module to look at its slightly impossible to say. I mean we do not know how many pages the module has etc so i couldnt begin to explain sorry... so long as you've taken a look at both the previous mensioned files and understood what they do, then you should have little problem adding them  |
|
|
|
 |
pureliving

|
Posted:
Sun Mar 01, 2009 9:11 pm |
|
Ok take for instance, the reminder module.
I accessed my website to find i have many shortlinks writings all over my website, but mainly at the bottom of my website, it pays more attention to the modules i should have shortlinked, for instance:
[ShortLinks_UnShortenedLinks] = Consider creating GT/GTB File(s) ::
ShortLinks/GT-Reminder.php
What i don't know is when looking through each module, what type of links do i look for to input in these necessary files to create shortened links?
xx Bless xx |
|
|
|
 |
trunks

|
Posted:
Mon Mar 02, 2009 5:27 am |
|
well anything from the modules.php?name=***** onwards, if thats what your asking. Unfortunatly im not the best teacher so forgive me if i do not answer your questions to the highest standard. |
|
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Mon Mar 02, 2009 7:04 am |
|
first thing to do is find every possible URL combination in your module, and create a txt file of those URL's for reference. You don't have to note every single page, if for instance the only difference is an id or cat number, etc... Look at the existing re-writes and try to find a module similar to yours... open the corresponding GT-file to see what was done there.
With a little trial and error it's not too hard to figure out
the htaccess rewrites the urls on the server, so if you get a 500 error you made a mistake there. the re-writes have to be here so the server understand what to do with the re-writen URL's.
the GT files handle the re-writes from within a module, so if you see some strange looking URL's you still have more work to do.
and finally if any blocks that reference your new module, you will need to add a re-write to the corresponding GTB file; for example GTB-block-Modules.php |
|
|
|
 |
trunks

|
Posted:
Mon Mar 02, 2009 7:13 am |
|
|
|
 |
spasticdonkey

|
Posted:
Mon Mar 02, 2009 12:04 pm |
|
if I'm looking at the right module there isnt too many links to shorten, the basic ones being (not a complete list)
Code:modules.php?name=Reminder&op=select_repdate
modules.php?name=Reminder&op=add_rem
modules.php?name=Reminder&op=add_rem_rep
modules.php?name=Reminder
|
which in htaccess would be something like
Code:#Reminder
RewriteRule ^reminder-select-date.html modules.php?name=Reminder&op=select_repdate [L]
RewriteRule ^reminder-add-regular.html modules.php?name=Reminder&op=add_rem [L]
RewriteRule ^reminder-add-repetitive.html modules.php?name=Reminder&op=add_rem_rep [L]
RewriteRule ^reminder.html modules.php?name=Reminder [L]
|
and GT file, not the full code add to urlin and urlout arrays
Code:// add to urlin
'"(?<!/)modules.php\?name=Reminder&op=select_repdate"',
'"(?<!/)modules.php\?name=Reminder&op=add_rem"',
'"(?<!/)modules.php\?name=Reminder&op=add_rem_rep"',
'"(?<!/)modules.php\?name=Reminder"'
// add to urlout
'reminder-select-date.html',
'reminder-add-regular.html',
'reminder-add-repetitive.html',
'reminder.html'
|
it's the edit and delete links that will give you some headaches, those characters in the URL will likely give you trouble.. I'm not touching those
Code:modules.php?name=Reminder&op=delete_rem_rep&del_rep=yourusername^test^d~12~25&al=no
modules.php?name=Reminder&op=edit_rem_rep&edt_rep=yourusername^test^d~12~25^your@email.com
|
btw, if you just shortening for SEO reasons, the reminder module is meant for registered users only and won't be indexed by search engines... |
|
|
|
 |
trunks

|
Posted:
Mon Mar 02, 2009 5:35 pm |
|
Quote: | btw, if you just shortening for SEO reasons, the reminder module is meant for registered users only and won't be indexed by search engines... | very true and valid point but adding it always helps when linking the pages to others, and it looks nice.. up to you though i guess |
|
|
|
 |
spasticdonkey

|
Posted:
Mon Mar 02, 2009 6:03 pm |
|
yes I like it for aesthetic reasons too, not to mention the ability to get a few keywords in the url if you write your own to suit your specific site  |
|
|
|
 |
pureliving

|
Posted:
Tue Mar 03, 2009 2:25 pm |
|
Thinking hyperthetically the reminder module was to help me illustrate an example of what i referred to, although the above is highly appreciated.
trunks pardon me if i say this but i am female:
Quote: |
im thinking he wants to know what to write for,
|
Thank you anyway for your advice, particularly Spasticdonkey, much appreciated; exactly the kind of thing i couldn't specifically recall how to do.
xx Bless xx |
|
|
|
 |
trunks

|
Posted:
Tue Mar 03, 2009 5:58 pm |
|
excuse me for my informality and your welcome for the advice  |
|
|
|
 |
transit
Regular


Joined: Jun 01, 2010
Posts: 69
|
Posted:
Mon Jul 19, 2010 6:08 am |
|
Just a quick question on an old topic I know... lol
Quote: | it's the edit and delete links that will give you some headaches, those characters in the URL will likely give you trouble.. I'm not touching those Smile
Code:
modules.php?name=Reminder&op=delete_rem_rep&del_rep=yourusername^test^d~12~25&al=no
modules.php?name=Reminder&op=edit_rem_rep&edt_rep=yourusername^test^d~12~25^your@email.com
| |
I am guessing you have to short link the delete/deactivate functions?
I am asking because I want to shortlink Documents 1.0 by NukeCoder
Since the documents are strictly admin editable only I was wondering if I could forgo the admin functions (delete etc.) Since no one or robot will ever actually be loading those pages.
Thoughts? |
|
|
|
 |
spasticdonkey

|
Posted:
Mon Jul 19, 2010 8:50 am |
|
i have a tap for that
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]
|
|
|
|
|
 |
transit

|
Posted:
Mon Jul 19, 2010 6:29 pm |
|
You sir are my saviour  |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Jul 21, 2010 8:51 pm |
|
spasticdonkey, since I have a forum for Only registered users can see links on this board! Get registered or login! would you mind posting there as well or may I repost? |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
spasticdonkey

|
Posted:
Thu Jul 22, 2010 7:13 am |
|
done  |
|
|
|
 |
|