2 of 2
2
NEW - Fetch Current URI plugin…
Posted: 26 June 2008 04:04 AM   [ Ignore ]   [ # 19 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

Hiya,

Not really any specific use really other than someone had asked in this thread about how to get at that information so I thought I would have a go at making a plugin to do just that.

People have used it for different uses such as bread-crumb trails and the like but really it does just what it says on the tin (tin is located at the top post! wink ).

If people find a use for it then great but I really just made it to help someone out in a post the once and thought I would place it into the plugins forum for people to use.

One plugin that I just created that you may (or may not) find useful though - depending on if you use comments on your site or not - is my new Group Comment plugin.

Sorry I can’t give more information on this plugin though as I never used it myself but rather just created it to help someone out.

Speak to you soon.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 23 September 2008 01:37 AM   [ Ignore ]   [ # 20 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1593
Joined  01-05-2007

Hi Mark,

I love the plugin smile

do you know if I can build a url and use a variable then grab the content using $_GET?

What I want to do is grab the current URL, pass it along to a popup window which has a tell a friend form.

<a href="{path=" rel="email_page">Email Page</a>


Then in the head of the popup Tell a Friend template I have -

<?php
$url_refer
= $_GET['refer_page'];
?>

Lastly I have this code to output it -

<?php echo $url_refer; ?>

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 23 September 2008 03:29 AM   [ Ignore ]   [ # 21 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

Hi Steven,

Unfortunately some of your code is missing above but I think I get what you are after.

I’ve never done it using my plugin as that was just written for one single purpose but what you are after can definitely be done and might be a little easier if you use a session variable as opposed to PHP, just keeps the templates looking a little neater in my mind wink

There’s a very good session variables plugin available here :

Session Variables

You could set the session variable to the current page and then when you go to the next page you should be able to retrieve it really easily. As for using my plugin in conjunction with that one I’ve never tried it so can’t say that it would definitely work but you could always use something like this instead if it doesn’t :

http://www.example.com/{segment_1}/{segment_2}/{segment_3}/{segment_4}/{segment_5}

and so on and so forth up until 9 segments and do it that way I guess instead. You could also write a simple plugin which would do all this for you too probably so that you would find the URI first and then write it into a session variable and then have a tag on your next page which brings back the session variable again. So basically taking my plugin and the session variables plugin and creating them as one entity.

Hope some of that helps.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
   
2 of 2
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65085 Total Logged-in Users: 39
Total Topics: 82223 Total Anonymous Users: 16
Total Replies: 441920 Total Guests: 213
Total Posts: 524143    
Members ( View Memberlist )
Newest Members:  BombermanhaimtuagocsadamVeNeaDoRHildegaardhrtrulzUNFORGIVEN IIIEmmanuelYanYanTomsB