We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

NEW - Fetch Current URI plugin…

Development and Programming

Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

When you say the modifications then do you mean with the plugin that Aaron posted above? If so then you can still download the original plugin from my first post if you wish.

Best wishes,

Mark

       
allgood2's avatar
allgood2
427 posts
16 years ago
allgood2's avatar allgood2

No, I’m just using version 1.02 of the original plugin. I also tried version 1.00. I believe the problem maybe that the plugin is pulling the details from EE itself and not the $_SERVER . I don’t know. But the fact that I’m stripping out the index.php everywhere else in EE and the addition of the / is reflected in the url, at the base level. I even went into PHP and just added the line

<?php global $IN; echo $IN->URI; ?>

and the adjustments are reflected there as well.

I’ve currently just switched to

<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>

but am trying to figure out how to store as a variable or something shorter so I can build the url from that.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Ah I see what you mean now. You are indeed right that the plugin creates the URL using built-in ExpressionEngine code methods. I didn’t want to use server variables as I wasn’t too well versed with them when I wrote the plugin so just went with the built-in functions instead.

Saying that though you can very easily create a current URL by doing something like this though :

{homepage}{segment_1}/{segment_2}/{segment_3}/{segment_4}/{segment_5}/{segment_6}/{segment_7}/{segment_8}/{segment_9}

That should hopefully get you what you need?

Best wishes,

Mark

       
salmoon's avatar
salmoon
26 posts
15 years ago
salmoon's avatar salmoon

Helloo.

Can this easily be updated to be EE2.0 compatible? I’m using it in a site i’m upgrading to EE2.0!!

Thanks.

       
salmoon's avatar
salmoon
26 posts
15 years ago
salmoon's avatar salmoon

I’m definitely not a hardcore coder by any means, but it turns out i’m pretty good at modyfing! I compared this plug-in to an EE2.0 plug-in and attempted to make some tweaks to make it work with EE2.0.. and much to my surprise it worked!

I’m not sure if i’m allowed to post the altered file / whether you plan to do it yourself Mark?

       
Uncommon Knowledge's avatar
Uncommon Knowledge
86 posts
15 years ago
Uncommon Knowledge's avatar Uncommon Knowledge

Agreed with the above, I’d definitely like to use this wit EE 2.0 unless there is a function in 2.0 to do the same already?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen

Oops sorry for not replying to this one sooner everyone.

Salmoon that’s fine if you want to post the 2.0 version by all means.

Best wishes,

Mark

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.