• Welcome to Simple Machines Community Forum. Please login or sign up.
January 24, 2022, 07:19:00 PM

News:

Wondering if this will always be free?  See why free is better.


Global Headers and Footers

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

Previous topic - Next topic

tpshow

July 07, 2017, 06:56:51 PM #1040 Last Edit: July 07, 2017, 07:39:45 PM by tpshow
Please can someone here help, i have Global header and Footer installed and added adsense code - hxxp:www.thebillioncoin.org.ng [nonactive] It displays on all pages including the login page. Adsense sent mail to remove the ads from the login page. How can i restrict only the login page from showing the adsense advert that i inserted via the Global header and footer mod.

Thanks

vbgamer45

 It would have to be custom php code
Or you have to modify headers and footers to not show on that action page.
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

desertcities

Tried to install latest Global Headers and Footers package but got a warning not to install it. 

See the attached screenshot for the warning.

I'm using the latest Nebula Theme by SMFpacks. 

I tried adding just the Analytics code to my index.template.php file for the Nebula Theme, but also got errors. 

Any suggestions?

Thank you very much.

vbgamer45

It's only failing on one of the admin.php changes. The template doens't matter.
Make the change manually to the sources file for the one that failed after you installed.
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

desertcities

Thanks Man!

Got it working.

Peace.

SaltedWeb

November 30, 2017, 03:12:58 PM #1045 Last Edit: November 30, 2017, 03:45:35 PM by SaltedWeb
I have used this mod before in the past with no issues, I did find this last install
The  Head <head></head> area comes up  403 error when used.
However both
Header Content
Footer Content
are ok.
I have used simple scripts like even a marque to see if i could get it working.
Since it installed with no errors just fine and most of it works I am assuming its me doing something?
But maybe not any ideas what causes that ?

Thanks
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

vbgamer45

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

SaltedWeb

So being the However both
Header Content
Footer Content
are ok.

The header script could cause that error from my server ?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

vbgamer45

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

SaltedWeb

Ok I'll check that out thank you.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

SaltedWeb

Quote from: vbgamer45 on November 30, 2017, 03:28:57 PM
Probably a mod_security error
https://wiki.simplemachines.org/smf/Mod_security_-_Having_problems_with_mod_security


vbgamer45,
I checked with their support they found no error with my IP address or on my site logs. However in Cpanel I could disable the
Mod_security and the 403 error went away however the script did not show up in the forum anywhere.
Good news I know what causes the 403 error ( Thank You) . However the header section doesn't seem to work maybe why it was spitting out an error for me? Its not a big deal, i'll just use part of it and input some stuff manually.
Unless you have an idea why it wouldn't show up? Thanks again for all your help.

SW
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

pepa

Is it possible to alter this mod so it only displays on the initial page of the forum and not on any boards, the login page or registration page?

vbgamer45

Possible would require code changes.
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

pepa

Quote from: vbgamer45 on February 14, 2018, 09:06:14 AM
Possible would require code changes.
Do you know which files are involved, or if we did that would it infringe a copyright?

vbgamer45

I don't know offhand I would have to research.
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

brynn

Hi Friends,
I used this mod to apply some code for an analytics app (then called Piwik, now Matomo) 5 years ago when I first started my website (SMF forum with Tiny Portal, plus CPG gallery).  All this time it's been recording visits, however, I've just realized that it might not have been recording all the visits, because I think parts of the code might not be working properly, perhaps because of a bug in this mod.

I'll just show you a line of the code, to demonstrate the problem.  Here's what the code is supposed to look like (one line) and indeed what I entered in this mod (global footer in this case).

    _paq.push(['setSiteId', 1]);

And here's what we see if we look at the source code for any page

    _paq.push([&#39;setSiteId&#39;, 1]);

As you can see, the single quote has been replaced with unicode, effectively breaking the code for tracking.  Every single quote in the entire code is replaced with unicode.  (Or....well it might not be exactly unicode, but it's some kind of code which represents the single quote.)

To be fair, a few pages back in this thread, this was reported.  Message 932.  However, I do have the current version for the mod installed, so if this is a bug in the mod, it has not been fixed.

And for more fairness, I'm not convinced this is not an inability by browser software (which displays the source code) to display single quotes, although that would seem bizarre to me.  I can't think of any way to view the source code without using a browser, so I can't really prove whether a display issue is the problem or not.

To answer questions about why didn't I notice that the analytics wasn't working, there are 2 types of tracking.  So it may be that I've only been seeing the results from the type of tracking which does not have single quotes in it's code.  (Of course you can see all the code by looking at the source code for my site, link below.)

SMF 2.0.15
TP 1.5.1
Global Headers/Footers 2.0.1
approx 40 other mods, can list if necessary
home page:  https://forum.inkscapecommunity.com/index.php

Let me know if you need more info.

Is this mod really not working properly?  If it's not, is there any way to fix it?  Or is it more an SMF problem that the single quotes don't work?

When this was reported in Message 932, there followed a couple of suggestions for fixing some code, as well as a suggestion to report a bug.  But I didn't really understand what was being suggested, or where the code is that needs to be fixed.  Plus by now, perhaps there is a better way to fix it (if it's fixable, anyway)?  It's also not clear whether any bug was ever reported.

Thanks for your help!
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

brynn

Hhmm, no comments....  Am I missing something obvious?  I'm not very tech-savvy, so it's possible I need something explained.  Or is it just a busy time right now?
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

vbgamer45

Haven't had time busy with family.
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

brynn

Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

SMFHacks.com Team

Have made update to saving/editing headers/footers to hopefully help with possible data issues.
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Advertisement: