Page Index Toggle Pages: 1
Topic Tools
Hot Topic (More than 10 Replies) Can i add a tab that links to a https site rather than just http? (Read 1,825 times)
Adrian_Horn
YaBB Newcomer
*
Offline



Posts: 9

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #11 - Apr 16th, 2013 at 8:26am
Post Tools
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!
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,604
Location: Los Angeles

YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Reply #10 - Apr 15th, 2013 at 4:48pm
Post Tools
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!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Online



Posts: 2,262
Location: Earth

YaBB 2.6.0
Re: Can i add a tab that links to a https site rather than just http?
Reply #9 - Apr 15th, 2013 at 4:34pm
Post Tools
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 »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,604
Location: Los Angeles

YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Reply #8 - Apr 15th, 2013 at 3:49pm
Post Tools
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!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Adrian_Horn
YaBB Newcomer
*
Offline



Posts: 9

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #7 - Apr 15th, 2013 at 3:26pm
Post Tools
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.



  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,604
Location: Los Angeles

YaBB 2.4
Re: Can i add a tab that links to a https site rather than just http?
Reply #6 - Apr 15th, 2013 at 3:26pm
Post Tools
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!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Adrian_Horn
YaBB Newcomer
*
Offline



Posts: 9

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #5 - Apr 15th, 2013 at 3:25pm
Post Tools
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.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Online



Posts: 2,262
Location: Earth

YaBB 2.6.0
Re: Can i add a tab that links to a https site rather than just http?
Reply #4 - Apr 15th, 2013 at 3:17pm
Post Tools
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.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
depablo
YaBB Moderators
YaBB Next Team
Beta Testers
***
Offline



Posts: 577
Location: UK

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #3 - Apr 15th, 2013 at 1:17pm
Post Tools
Looks like this is one for our resident coders  Wink
  

Taking a peek behind the mask Wink
Back to top
 
IP Logged
 
Adrian_Horn
YaBB Newcomer
*
Offline



Posts: 9

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #2 - Apr 15th, 2013 at 1:16pm
Post Tools
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!
  
Back to top
 
IP Logged
 
depablo
YaBB Moderators
YaBB Next Team
Beta Testers
***
Offline



Posts: 577
Location: UK

None
Re: Can i add a tab that links to a https site rather than just http?
Reply #1 - Apr 15th, 2013 at 12:49pm
Post Tools
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
Back to top
 
IP Logged
 
Adrian_Horn
YaBB Newcomer
*
Offline



Posts: 9

None
Can i add a tab that links to a https site rather than just http?
Apr 15th, 2013 at 10:40am
Post Tools
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
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top