Montego Scripts: Forums
 

 

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



Joined: Dec 04, 2008
Posts: 16

PostPosted: Fri Aug 14, 2009 8:48 pm Reply with quote

I have several modules that i am now ready to shortlink, however although i understand that the rewrite rules are required in the .htaccess, urlin and urlout needed in a GT-file.php, but i find i am confused over a few characters that are used within URL links before they are shortlinked.

Are certain characters just changed to html coding or are there specific characters to replace odd characters, for instance,

the use of # (mostread#top or id=8&offset=0#start)
or how would i write in the shortlink, the difference between username if listed within a link, such as:
contributerbrowse&query=username or search&search=user:Anonymous

I am also confused as to how to shortlink the following:
/modules.php?name=Reminder&op=edit_rem_rep&edt_rep=username^Modules%20Shortlinks^c~01^email@emailaddress.com
/modules.php?name=Reminder&op=delete_rem&del=username^Get%20Work%20Done^2010-12-31&al=no

Could you please advice me, as i have looked through my htaccess and GT files, but still i can not make sense how to do this; i also tried searching google, and have download the mod_rewrite-cheat-sheet 1 + 2, but nothings providing me an answer so far.
I would truely be greatful if you could please advice me.
Your time is much appreciated.
Thankyou.
Pureliving
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Aug 16, 2009 7:49 pm Reply with quote

pureliving,

Good to hear from you. First, let me address specifically the '#' when it is being used as an in page anchor, which in *nuke, I am pretty sure that is its use. Do NOT try and tap it. In fact, let it carry over like this:

sometext-3-1.html#xxxxxx

That is a completely valid use of the '#'.

However, the other characters that you reference, you need to add those specifically to the RegEx list of valid characters to "find". For example, this one here:

/modules.php?name=Reminder&op=edit_rem_rep&edt_rep=username^Modules%20Shortlinks^c~01^email@emailaddress.com

This one is difficult because you could use the following to carve out the entire string after the edt_rep=, but I am not so sure that is what you want:

edt_rep=([a-zA-Z0-9~\^@\.%]*)

It almost looks like this code is embedding more data within one variable than it really should. Really bad style IMO.

What do YOU want the final .html links to look like for the two links in question?
 
View user's profile Send private message Visit poster's website
pureliving
Newbie
Newbie



Joined: Dec 04, 2008
Posts: 16

PostPosted: Tue Aug 18, 2009 2:41 pm Reply with quote

Well basically Montego the example module i illustrate is the reminder module.

Here's an example of the .htaccess file rewrite rules, i have achieved to do so far:

Quote:

RewriteRule ^reminder.html modules.php?name=Reminder [L]
RewriteRule ^addrepetitivereminder.html modules.php?name=Reminder&op=add_rem_rep [L]
RewriteRule ^selectrepdate.html modules.php?name=Reminder&op=select_repdate [L]
RewriteRule ^addregularreminder.html modules.php?name=Reminder&op=add_rem [L]
RewriteRule ^insertreminder.html modules.php?name=Reminder&op=insert_rem [L]
RewriteRule ^editrepetitivereminder.html modules.php?name=Reminder&op=edit_rem_rep&edt_rep=??? [L]
RewriteRule ^deleterepetitivereminder.html modules.php?name=Reminder&op=delete_rem_rep&del_rep=??? [L]
RewriteRule ^editregularreminder.html modules.php?name=Reminder&op=edit_rem&edt=??? [L]
RewriteRule ^deleteregularreminder.html modules.php?name=Reminder&op=delete_rem&del=??? [L]


Where i have stated ? upon the last four, that is where lays the confusion with these extensions:

Quote:

1, username^Modules Shortlinks^c~01^email@emailaddress.com

2, username^Modules Shortlinks^c~01&al=no

3, username^Get Work Done^2010-12-31^email@emailaddress.com

4, username^Get Work Done^2010-12-31&al=no


So basically, what i am trying to figure out for future reference is how would i defranciate shortlinking:

=randomusername

=randomdatestring

=randomemailaddress

that i may find with URL's within some modules, such as this one in question.

Thank you.

xx Bless xx
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Wed Aug 19, 2009 8:22 am Reply with quote

To be quite honest with you, there is NO value in shortening these links. They are nonsensical. I realize that they are necessary for this module to work (I will reserve my comments on what this module is doing), but shortening them provides no value because the final URL is going to still be quite long. You would be better off just leaving those un-"tapped" IMO.

BTW, I am not sure what you mean by "defranciate" as I can find no definition for this word. Can you explain in words what you mean by this last part?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch