News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Global Headers and Footers

Started by SMFHacks.com Team, August 02, 2006, 10:39:07 PM

Previous topic - Next topic

margarett

Not totally on-topic but I think it's worthwhile:
There is another topic around in with another user and chrome and that same "data" thing. In his case, it was when posting...
Maybe this is related?
http://www.simplemachines.org/community/index.php?topic=513591.0
He's on 1.1.x, though...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

SoftwareSamurai

Interesting that others are seeing this behavior as well. I think someone (like an engineer directly working on SMF) should take long hard look at the redirectexit() call to make sure it's sending the correct Status code. From what I can gleam from the 'net, a Location header should be accompanied by a 30x status code, and sending a 20x status code apparently messed up some browsers.

p.s. Good catch margarett

Arantor

The location header automatically should also be generating a 302 status at the same time, certainly for me SMF 2.0 and 2.1 do that on normal redirectexit calls - even on Chrome (beta branch)

I'd be wondering what the data URL actually contains.

SoftwareSamurai

Quote from: Arantor on November 02, 2013, 04:14:04 PM
The location header automatically should also be generating a 302 status at the same time, certainly for me SMF 2.0 and 2.1 do that on normal redirectexit calls - even on Chrome (beta branch)

I'd be wondering what the data URL actually contains.
How do I capture that?

Arantor

Well if you're redirected to a data: URL... it's the URL you're currently on...

SoftwareSamurai

@SMFHacks.com team:

It appears that with SMF 2.0.6, the X-XSS-Protection mode has been enabled with "mode=block". This is causing Chrome (v30.x) to block the refresh of the admin page after a user enters some javascript in either of the headers or the footer and hits the "Save Settings" button.

The solution, as suggested by Arantor, is for mod authors to "adjust" this setting directly themselves in their mods whenever a POST followed by a GET could contain the same exact javascript (which is what Chrome is triggering on in this instance).

I would like to suggest that you consider placing the necessary header() call into the global-hf.template.php file, in the template_global_hf_admin() function, inside the if test for the success/saved, and before the echo. (e.g.):

   if (isset($_GET['success']) && $_GET['success'] == 'saved')
   {
      header('X-XSS-Protection: 1'); // reset the XSS protection to allow the page to load
      ...


I've tested this on a clean install of SMF 2.0.6 with only this mod installed and it appears to work. Chrome will load the admin page and the javascript will simply be disabled for that specific page load.

p.s. I'm not sure why this problem doesn't show up in Firefox (v25) and IE (v10.x).

joeyjojoshabadoo

Hi guys,

thanks for the great free mod.

Quick question - is there any way to have three columns of footer links using this mod? I already have one column of links, but thwn i try to make a middle one with a centre align, it's not in line with the other ones, as youc an see at the bottom here on dropkickrugby.com. Any ideas on a workaround? Was thinking maybe you've dealt with this before. Cheers

Burke ♞ Knight


vbgamer45

Quote from: joeyjojoshabadoo on December 09, 2013, 09:01:25 AM
Hi guys,

thanks for the great free mod.

Quick question - is there any way to have three columns of footer links using this mod? I already have one column of links, but thwn i try to make a middle one with a centre align, it's not in line with the other ones, as youc an see at the bottom here on dropkickrugby.com. Any ideas on a workaround? Was thinking maybe you've dealt with this before. Cheers

You can use html tables to setup multiple columns
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

joeyjojoshabadoo


ss_wilson

Hello all. Thanks for this mod

Unfortunately, I cannot get it to work. It installs fine, once I try to enter something into the <head> area it gives me the following error:


Thanks for any insight you can provide.

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

cristianoportela

guys, please... i'm setting an new website, with an feature that i already have in another one that is running smf 2.0.6 and Global Headers Footers 2.0: with this version, tweeter widgets works like a charm, i just have to set it under tweeter account and then generate an script widget, that i can add into any website through "a class="twitter-timeline" width="520" height="164" data-dnt="true" href= bla bla". but with smf 2.0.7 and Global Headers Footers 2.0.1 this doesn't work as should, i'm stuck with "tweets from @someone". any ideas why?

thanks in advance

vbgamer45

Should work ok Any javascript/html code should work in the headers/footers.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

cristianoportela

yes, it should, but don't. to have anything working, HTML Allowed. an simple test:

<center>
<a class="twitter-timeline"  href="hxxp://twitter.com/just_scripttest"  data-widget-id="438366181720739840">Tweets de @just_scripttest</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs); [nofollow]}}(document,"script","twitter-wjs");</script>

with this, instead an tweeter inside your site, all that you get is this:
postimg.org/image/kd2j3m0bb/

honestly, i really don't know why this isn't working with ghf 201 and is working with ghf 2.0

[]s

desai_amogh

im getting an error while installing this mod SMF.

error is listed in the images.  I am running SMF 2.0.7, my site name is www.electronicsforum.in

I need to add a custom image link in the header, so that every time i share a post or link, image in the header gets attached to it (being the first image on the page) instead the Avatar of the user.

please help!

vbgamer45

You shooed install the mod.
Then make the edit in Capture1.PNG to the file manually.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lastlight2703

this is a great mod and it is working perfectly fine .

Can someone teach me how to add a background picture for the header.


Steve

Hopefully someone helped you out.

What file would I go to for the txt string that contains the title of this mod? All I want to do is shorten it a bit so it fits in a dropdown menu. :)
DO NOT pm me for support!

margarett

Themes/default/languages/smfhacks_languages/global-hf.english.php (or english-utf8)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: