Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    E-Blah 10.x Mods  ›  Facebook URL Mod
Users Browsing Forum
No Members and 5 Guests

Facebook URL Mod  This thread currently has 1,020 views. Print
1 Pages 1 Recommend Thread
impished
December 20, 2011, 4:45am Report to Moderator Report to Moderator
Forum Moderation
Posts: 149
Posts Per Day: 0.04
Reputation: 100.00%
Reputation Score: +3 / -0
Time Online: 2 days 15 hours 7 minutes
Hi peeps,

Ever noticed that links to your E-Blah website show as "Fatal Error" in Facebook?
This mod will stop that.
Code
<author="Adrian Mayhew">
<modname="URL Escape">
<version="1">
<boardversion="10.3.6">
<site="www.sketchymtb.co.uk">
<desc="Facebook escapes the / character in links.  E-blah doesn't like the escape character.  This mod makes E-blah deal with it correctly.">
<openfile="Root/Blah.pl" writes="1">
<mod search="1">
@url = split(/\//,$ENV{'QUERY_STRING'});
</mod end>
<mod write="1" action="2">
@url = split(/\/|\%2F|\%2f/,$ENV{'QUERY_STRING'});
</mod end>



NOTE: it appears that this mod WILL NOT WORK as expected with mod-rewrite turned on
Happy Christmas

Revision History (1 edits)
Nat  -  December 29, 2011, 5:45am
additional information
Logged Offline
Site Site Private Message Private message
Nat
December 20, 2011, 10:58am Report to Moderator Report to Moderator

Here to help
Administrator
Posts: 1,988
Gender: Male
Posts Per Day: 0.56
Reputation: 87.23%
Reputation Score: +41 / -6
Time Online: 5 days 13 hours 30 minutes
Location: Manchester UK
Age: 57
Have always had this problem on Facebook..

I take it the site URL needs to be changed.. Then how do you apply the mod?


"Thats the way the mop flops"
Logged Offline
Site Site Private Message Private message Reply: 1 - 8
impished
December 21, 2011, 9:48am Report to Moderator Report to Moderator
Forum Moderation
Posts: 149
Posts Per Day: 0.04
Reputation: 100.00%
Reputation Score: +3 / -0
Time Online: 2 days 15 hours 7 minutes
Copy the code above and goto the Admin panel.  Select Modification Center and you should see a box where you can paste the mod.  Test install and then install.
(or just edit the line in Blah.pl )

Facebook (and prolly others) encode the URL, changing the forward-slashes to %2F.  Eblah trips over these without the mod.

Have fun.

Revision History (1 edits)
impished  -  December 21, 2011, 10:02am
Logged Offline
Site Site Private Message Private message Reply: 2 - 8
Nat
December 22, 2011, 5:33pm Report to Moderator Report to Moderator

Here to help
Administrator
Posts: 1,988
Gender: Male
Posts Per Day: 0.56
Reputation: 87.23%
Reputation Score: +41 / -6
Time Online: 5 days 13 hours 30 minutes
Location: Manchester UK
Age: 57
that works a treat  


"Thats the way the mop flops"
Logged Offline
Site Site Private Message Private message Reply: 3 - 8
threewishes
December 28, 2011, 2:56pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 316
Posts Per Day: 0.08
Time Online: 3 days 2 hours 21 minutes
loaded the mod and it crashed my system, I had to re-ftp a backup blah.pl.
Logged Offline
Private Message Private message Reply: 4 - 8
impished
December 29, 2011, 1:51am Report to Moderator Report to Moderator
Forum Moderation
Posts: 149
Posts Per Day: 0.04
Reputation: 100.00%
Reputation Score: +3 / -0
Time Online: 2 days 15 hours 7 minutes
Quoted from threewishes
loaded the mod and it crashed my system, I had to re-ftp a backup blah.pl.


Really....

It changes one line of code.  What error message did you get when it crashed your system?
What version of Eblah are you using?  (not that that should matter)


Just had another look and it appears that this mod WILL NOT WORK as expected with mod-rewrite turned on

Threewishes, if you get this kind of issue again, you should be able to access your forum using the full correct address instead of the rewritten one.  ie. http://www.yoursite.com/cgi-bin/forum/Blah.pl

Revision History (1 edits)
impished  -  December 29, 2011, 3:28am
Logged Offline
Site Site Private Message Private message Reply: 5 - 8
Justin
January 14, 2012, 5:02pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,252
Gender: Male
Posts Per Day: 2.48
Reputation: 93.31%
Reputation Score: +307 / -22
Time Online: 39 days 5 hours 58 minutes
Location: Tallassee, AL
Age: 32
If you get it worked out with mod_rewrite, PLEASE add submit a patch request to GitHub.

https://github.com/eblah/E-Blah-Forum

I'll review and merge so it can be in the main release.


My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Revision History (1 edits)
Justin  -  January 20, 2012, 7:59pm
Logged Offline
Site Site Private Message Private message Reply: 6 - 8
impished
January 15, 2012, 6:03am Report to Moderator Report to Moderator
Forum Moderation
Posts: 149
Posts Per Day: 0.04
Reputation: 100.00%
Reputation Score: +3 / -0
Time Online: 2 days 15 hours 7 minutes
Quoted from Justin
If you get it worked out with mod_rewrite, PLEASE add submit a patch request to GitHub.

https://github.com/onfire4g05/E-Blah-Forum

I'll review and merge so it can be in the main release.


Is this a hint of future Eblah development?
Logged Offline
Site Site Private Message Private message Reply: 7 - 8
pcmantinker
January 17, 2012, 10:31pm Report to Moderator Report to Moderator

It's not what is seen that matters, it's character
Forum Support Team
Posts: 492
Gender: Male
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +11 / -0
Time Online: 4 days 5 minutes
Location: Covington, LA
Age: 28
The GitHub repository is for people to submit bug fixes for improving the existing code base. I'm not sure if Justin plans on another main release, but I think he was more referring to merging your fix with the master branch of development.


IGA: International Gamers' Alliance: http://www.iga-home.net/
Social Networking Website for Gamers

Life is so much better sober.
For it is by grace you have been saved, through faith—and this not from yourselves, it is the gift of God—[Eph 2:8]
Logged Offline
Site Site Private Message Private message AIM AIM YIM YIM Windows Live Messenger WLM Skype Skype Reply: 8 - 8
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    E-Blah 10.x Mods  ›  Facebook URL Mod

Thread Tags
mod,  E-Blah