YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Can i add a tab that links to a https site rather than just http? (Read 1,450 times)
 Apr 15th, 2013 at 10:40am
There are no actions to perform.  

Adrian_Horn 
YaBB Newbie
*
Offline
Posts: 9


YaBB 2.5
Can i add a tab that links to a https site rather than just http?
I'm trying to add a new tab to the top of our forum, but the link automatically adds http in front of the address. I require it to add https instead. Is there anyway of doing this?

Cheers
Adrian
 
 
IP Logged  
 Reply #1 - Apr 15th, 2013 at 12:49pm
There are no actions to perform.  

depablo 
YaBB Moderators
YaBB Next Team
Beta Testers
***
Offline
Posts: 577
UK


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
Sorry for the delay, at work  Sad

If your using the add tab function I copied and pasted the link to PayPal and it works. However on a later version of your board and I am not at home to access other test boards, someone will be along later with the solution  Smiley
« Last Edit: Apr 15th, 2013 at 12:50pm by depablo »  
Taking a peek behind the mask Wink
 
IP Logged  
 Reply #2 - Apr 15th, 2013 at 1:16pm
There are no actions to perform.  

Adrian_Horn 
YaBB Newbie
*
Offline
Posts: 9


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
I'm using 2.5.2. Paypal automatically redirects to https if http is used. The site I'm linking to doesn't. It requires https to be used and will fail if only http is used.

If add the full https address in the link, it sill tries to append http at the front of the link as well as having the https!
 
 
IP Logged  
 Reply #3 - Apr 15th, 2013 at 1:17pm
There are no actions to perform.  

depablo 
YaBB Moderators
YaBB Next Team
Beta Testers
***
Offline
Posts: 577
UK


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
Looks like this is one for our resident coders  Wink
 
Taking a peek behind the mask Wink
 
IP Logged  
 Reply #4 - Apr 15th, 2013 at 3:17pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
That's a piece of coding we've been fighting with for ages and will be changed in 2.5.4. I'll be back with a fix for you after breakfast - hubby is getting cranky.
 
WWW  
IP Logged  
 Reply #5 - Apr 15th, 2013 at 3:25pm
There are no actions to perform.  

Adrian_Horn 
YaBB Newbie
*
Offline
Posts: 9


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
Dandello wrote on Apr 15th, 2013 at 3:17pm:
That's a piece of coding we've been fighting with for ages and will be changed in 2.5.4. I'll be back with a fix for you after breakfast - hubby is getting cranky.

That would bre great, thanks.
 
 
IP Logged  
 Reply #6 - Apr 15th, 2013 at 3:26pm
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Until a resident coder comes up with a fix for this, a relatively easy way to solve your problem is to add a PayPal tab in your menu that goes to a page on your site (index.html or index.htm) in a folder for your PayPal link. That file will automatically refresh to the PayPal link that you need (https versus http).

That way, whenever your PayPal menu tab is chosen, that person will go straight to your PayPal account.

So your YaBB's menu tab might link to the following:

Code Select All
www.TypeYourSiteHere.com/PayPal
 


In the folder listed above, the index.html or index.htm page you created will be on your server as follows:

Code Select All
www.TypeYourSiteHere.com/PayPal/index.html
 


The index page that you create above can simply include the following redirect in between the <head> and </head> tags:

Code Select All
<head>

<META HTTP-EQUIV=REFRESH CONTENT="0; URL=https://www.paypal.com/webapps/mpp/home-merchant">

</head>
 


With the coding I've mentioned above, you'll of course need to replace it with the PayPal link that works for you. But hopefully you'll understand this solution.

Good luck!

Edited:
Dandello wrote on Apr 15th, 2013 at 3:17pm:
I'll be back with a fix for you after breakfast ...


 
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #7 - Apr 15th, 2013 at 3:26pm
There are no actions to perform.  

Adrian_Horn 
YaBB Newbie
*
Offline
Posts: 9


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
Bill Myers wrote on Apr 15th, 2013 at 3:23pm:
Until a resident coder comes up with a fix for this, a relatively easy way to solve your problem is to add a PayPal tab in your menu that goes to a page on your site (index.html or index.htm) in a folder for your PayPal link. That file will automatically refresh to the PayPal link that you need (https versus http).

I see where your coming from (I'm not after a Paypal site - but I see what you're getting at). I was thinking about a redirect page as a work around myself. Thanks.

That way, whenever your PayPal menu tab is chosen, that person will go straight to your PayPal account.

So your YaBB's menu tab might link to the following:

Code Select All
www.TypeYourSiteHere.com/PayPal
 


In the folder listed above, the index.html or index.htm page you created will be on your server as follows:

Code Select All
www.TypeYourSiteHere.com/PayPal/index.html
 


The index page that you create above can simply include the following redirect in between the <head> and </head> tags:

Code Select All
<head>

<META HTTP-EQUIV=REFRESH CONTENT="0; URL=https://www.paypal.com/webapps/mpp/home-merchant">

</head>
 


With the coding I've mentioned above, you'll of course need to replace it with the PayPal link that works for you. But hopefully you'll understand this solution.

Good luck!

Edited:
Dandello wrote on Apr 15th, 2013 at 3:17pm:
I'll be back with a fix for you after breakfast - hubby is getting cranky.



 
 
IP Logged  
 Reply #8 - Apr 15th, 2013 at 3:49pm
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Adrian_Horn wrote on Apr 15th, 2013 at 3:26pm:
I see where your coming from (I'm not after a Paypal site - but I see what you're getting at). I was thinking about a redirect page as a work around myself. Thanks.

Cool. Cool

I routinely use redirects because of how many pages one of our sites has. That way, if or until an advertising link or email link is edited or deleted as they should be on individual pages, only one editing change in one file needs to be uploaded to our server.

I do use editing software that replaces text on multiple pages as I need it, but using refresh has saved me and our staff a lot of work.

Try fixing one bad link that's on a few hundred pages. Shocked

 
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #9 - Apr 15th, 2013 at 4:34pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
The YaBB fix is: in AdvancedTabs.pl find
Code Select All
		if ($taburl !~ /^\http:\/\//) { $taburl = qq~http://$taburl~; }
 



Replace with :
Code Select All
        if (   $taburl !~ /^http:\/\//xsm
            && $taburl !~ /^https:\/\//xsm
            && $taburl !~ /^ftp:\/\//xsm )
        {
            $taburl = qq~http://$taburl~;
        }
        else { $taburl = $taburl; }
 



(This should work in 2.4, 2.5AE and 2.5.2)
« Last Edit: Apr 15th, 2013 at 4:35pm by Dandello »  
WWW  
IP Logged  
 Reply #10 - Apr 15th, 2013 at 4:48pm
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Dandello wrote on Apr 15th, 2013 at 4:34pm:
This should work in 2.4

And it does! Smiley

Your solution worked perfectly in our 2.4 forum! Smiley

******************************************************

Edited:
Just in case any of you want to use a shorter version of Dandello's code ...

In response to a post that Carsten made, Dandello posted, "And yours is so neat, maybe we'll use that one in 2.5.4 instead of mine."

As I mentioned here in this post, I followed Dandello's lead, and tested Carsten's shorter/neater version in our YaBB 2.4 forum. I can happily confirm that it works perfectly.

If you're interested, please go to this post of Carsten's so that you get his actual suggested code versus me quoting it here, and possibly making a mistake.


« Last Edit: Apr 15th, 2013 at 9:12pm by Bill Myers »  
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #11 - Apr 16th, 2013 at 8:26am
There are no actions to perform.  

Adrian_Horn 
YaBB Newbie
*
Offline
Posts: 9


YaBB 2.5
Re: Can i add a tab that links to a https site rather than just http?
Dandello wrote on Apr 15th, 2013 at 4:34pm:
The YaBB fix is: in AdvancedTabs.pl find
Code Select All
            if ($taburl !~ /^http:///) { $taburl = qq~http://$taburl~; }
 



Replace with :
Code Select All
        if (   $taburl !~ /^http:///xsm
            && $taburl !~ /^https:///xsm
            && $taburl !~ /^ftp:///xsm )
        {
            $taburl = qq~http://$taburl~;
        }
        else { $taburl = $taburl; }
 



(This should work in 2.4, 2.5AE and 2.5.2)



Perfect, thank you!
 
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.