Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> ShortLinks/TegoNuke
Author Message
pureliving
Worker
Worker



Joined: Dec 01, 2008
Posts: 180

PostPosted: Sun Mar 01, 2009 3:39 pm Reply with quote

Question

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
 
View user's profile Send private message
trunks
Worker
Worker



Joined: Oct 05, 2007
Posts: 152
Location: United Kingdom

PostPosted: Sun Mar 01, 2009 4:18 pm Reply with quote

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.

RavensScripts
 
View user's profile Send private message Visit poster's website MSN Messenger
pureliving







PostPosted: Sun Mar 01, 2009 5:54 pm Reply with quote

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







PostPosted: Sun Mar 01, 2009 6:01 pm Reply with quote

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 Smile
 
pureliving







PostPosted: Sun Mar 01, 2009 6:12 pm Reply with quote

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







PostPosted: Sun Mar 01, 2009 6:55 pm Reply with quote

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 Smile
 
pureliving







PostPosted: Sun Mar 01, 2009 9:11 pm Reply with quote

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







PostPosted: Mon Mar 02, 2009 5:27 am Reply with quote

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

PostPosted: Mon Mar 02, 2009 7:04 am Reply with quote

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
 
View user's profile Send private message Visit poster's website
trunks







PostPosted: Mon Mar 02, 2009 7:13 am Reply with quote

With out sounding sarcastic or rude you've only explained what i have and also what they do.. im thinking he wants to know what to write for, lets say:
[ Only registered users can see links on this board! Get registered or login! ]

etc etc

Wanting to know exactly what needs to be written for that, word for word?

now of course we know that [ 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! ]
comes under the same re-write rule... going round in circles i believe....
 
spasticdonkey







PostPosted: Mon Mar 02, 2009 12:04 pm Reply with quote

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&amp;op=select_repdate"',
'"(?<!/)modules.php\?name=Reminder&amp;op=add_rem"',
'"(?<!/)modules.php\?name=Reminder&amp;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 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


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







PostPosted: Mon Mar 02, 2009 5:35 pm Reply with quote

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 Smile but adding it always helps when linking the pages to others, and it looks nice.. up to you though i guess
 
spasticdonkey







PostPosted: Mon Mar 02, 2009 6:03 pm Reply with quote

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 Smile
 
pureliving







PostPosted: Tue Mar 03, 2009 2:25 pm Reply with quote

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







PostPosted: Tue Mar 03, 2009 5:58 pm Reply with quote

excuse me for my informality Smack and your welcome for the advice Smile
 
transit
Regular
Regular



Joined: Jun 01, 2010
Posts: 69

PostPosted: Mon Jul 19, 2010 6:08 am Reply with quote

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?
 
View user's profile Send private message
spasticdonkey







PostPosted: Mon Jul 19, 2010 8:50 am Reply with quote

i have a tap for that Wink

ShortLinks/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'
);

?>


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







PostPosted: Mon Jul 19, 2010 6:29 pm Reply with quote

You sir are my saviour Smile
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Jul 21, 2010 8:51 pm Reply with quote

spasticdonkey, since I have a forum for ShortLinks Additional Taps would you mind posting there as well or may I repost?

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
spasticdonkey







PostPosted: Thu Jul 22, 2010 7:13 am Reply with quote

done Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> ShortLinks/TegoNuke

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


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