SMF Banner Bar
Developed by WebDev (https://web-develop.ca/) for Simple Machines Forum (https://simplemachines.org/)
SMF 2.1.X compatibility
Description:It creates a banner that can be dynamically placed after any container ID in specific theme templates.
The bar can be configured from: Modification Settings -> Banner Bar within your SMF administration section.
Various configurations are available including adding your own corner icons, unique css and marquee settings.<--DOWNLOAD SMF BANNER BAR--> (https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=90)
Note: An archived version 1.6 is available for the SMF 2.0.X branch but is no longer supported.<--DOWNLOAD SMF BANNER BAR V1.6 FOR SMF 2.0.X--> (https://web-develop.ca/index.php?action=downloads;area=archived_smf_modifications;file=100)
Please let me know of any bugs or requests regarding this modification in this thread.
I wonder if it would be an idea to actually install it here so people can see what it looks like Chen?
Also, do I need to uninstall and delete the old 'Info Bar' entirely including the database tables or can I just uninstall the current version and install your new version?
Version 1.1 is now available which includes a CSS input for the HTML.
This will make it easier when adding ie. background to the opted HTML.
@Dave: You can uninstall the older one & remove the DB tables if you wish.
Quote from: Chen Zhen on July 10, 2022, 12:01:24 PMVersion 1.1 is now available which includes a CSS input for the HTML.
This will make it easier when adding ie. background to the opted HTML.
@Dave: You can uninstall the older one & remove the DB tables if you wish.
I uninstalled the older one and left the tables and they merged OK.
Thank Chen
Chen,
I'm not sure if this should work or not but I have an issue with html in the box.
I tried to use the [url="https} in the banner text but for some reason it doesn't work. The [div] does as you can see from the attachments
This is what I was trying to post
<div class="a"; align="center">Don't forget to vote in the poll for arcade games reset, go [url=https://www.quizland.co.uk/index.php/topic,53]here[/url] to make your choice</div>
Any ideas?
I don't think I put in a filter for BBCode but you can do it with HTML.
You have a css class name of "a" ?
<div class="a centertext">Don't forget to vote in the poll for arcade games reset, go <a href="https://www.quizland.co.uk/index.php/topic,53">here</a> to make your choice</div>
Quote from: Chen Zhen on July 21, 2022, 05:08:23 PMI don't think I put in a filter for BBCode but you can do it with HTML.
You have a css class name of "a" ?
<div class="a centertext">Don't forget to vote in the poll for arcade games reset, go <a href="https://www.quizland.co.uk/index.php/topic,53">here</a> to make your choice</div>
Well that works Chen thank you, my only issue now is that the colour of the link is blue, as is the background. I tried using {color=red} but that wont work.
Maybe I'll try to use an image. I'll work on it
Thanks again
Try this:
<div class="a centertext">Don't forget to vote in the poll for arcade games reset, go <a href="https://www.quizland.co.uk/index.php/topic,53" style="color: red;">here</a> to make your choice</div>
You can't use BBCode because I didn't filter the output with the SMF BBCode parser.
You'll have to use inline css (style) to get the HTML to work the way you want.
As it is the links will use your theme's css style sheet unless you override it with your own class or style elements.
Also there is a bug with this mod concerning mobile JavaScript output which I will work on this weekend.
Thanks Chen
Version 1.2 is now available.
Changes:
+ Added: option to disable corner icons
+ Added: option to choose "transparent" background
! Fixed: Banner Bar set to not display in admin due to possible token conflict
I found that sometimes the banner bar html can cause a problem with the SMF 2.1 token validation within the admin section.
For now the solution I came up with is to disable the Banner Bar in the admin section.
This means to test it, you'll have to navigate to the forum.
Until I figure out how to stop it from possibly messing with the admin token, this will allow the admin to function properly.
Thanks Chen
Version 1.3 is now available.
Changes:
! Fixed: hidden div added to the end of the body element (buffer hook)
!*& Fixed: added admin option to center Banner Bar horizontally
Version 1.4 is now available.
Changes:
+*& Added: option to disable for specific actions
+*& Added: help text for some admin options
+ Added: limited regex filter for BannerBar CSS input
! Fixed: output no longer executed during XML output
! Fixed: Banner Bar can now be displayed in Admin
! Fixed: recommended values are now applied for admin links
Thanks Chen
Sorry to bother you but how do I change the size of the text in the bar?
You had '.quizbanner { fontsize: 1.1rem; }' I upped that to 1.2rem and larger but it makes no difference
Quote from: Dave on October 16, 2022, 11:48:24 AMSorry to bother you but how do I change the size of the text in the bar?
You had '.quizbanner { fontsize: 1.1rem; }' I upped that to 1.2rem and larger but it makes no difference
You forgot the hyphen.
quizbanner { font-size: 1.1rem; }
I made a small mistake within the regex for filtering that input where the range quantifier has to be escaped when not using it for a range :-[ inside square brackets.
Thanks for the report!
Version 1.5 is now available.
Changes:
+ Changed: unique function to determine if enabled
+ Changed: buffer not parsed when disabled
! Fixed: regex meta-character (hyphen) inside square brackets escaped
Thanks Chen.
I tried all manner of variations on that including adding the hyphen, that was after I went to w3schools to see what I should put in.
It was likely because of the improper regex I used to filter the input which removed it when saved.
This should work fine now for version 1.5+.
A request please?
Is it possible, if not too difficult, to have an additional 'Save' button closer to the top of the banner admin page please?
It would be similar to the image attached.
The reason I ask is because when you're changing text/code etc you have to scroll all the way to the bottom of the page to save, and when you have quite a few themes, as I do on my main site, then it's quite a way down, and if you've messed up then you have to do it all again
Thanks
It uses SMF's generic template whereas I just set up the Source file and it creates the save button at the bottom of the template.
I can do it with its current format but it'll be with some JavaScript manipulation of the HTML.
There is also the option of making a custom template but that's more work.
I'll look at it this week and release something for you.
Download the attachment & use it to replace the file in your Sources path.
It adds a SAVE button to each of the template settings (saves all settings on the page).
Lat me know if that works for you.
Thanks very much
Quote from: Chen Zhen on December 12, 2022, 12:55:07 AMDownload the attachment & use it to replace the file in your Sources path.
It adds a SAVE button to each of the template settings (saves all settings on the page).
Lat me know if that works for you.
I know it's been a while but look at the images. You see that it works for some themes on my DJ site and on the quiz site it works for other themes but not the same on both, well not all the themes anyway.
There is no rush for this it works a lot better than it did, so thank you for that.
Each theme will give unique options for the parent ID which you are leaving blank.
If the bar is not showing up properly or not at all, have you tried to adjust that setting for each theme?
Or... are you just referring to that save button that is added to every theme option?
Quote from: Chen Zhen on January 04, 2023, 08:48:43 PMOr... are you just referring to that save button that is added to every theme option?
Yes, it's not putting a save into each theme. I posted the images to show that it's not limited to just one site, as you can see in djbanner, the Steyle theme has the save, but in the qzbanner image you'll see that the save button isn't there.
As I said this is not a problem as there is now a save button closer to the top of the page which is what I requested
Version 1.6 is now available.
Changes:
! Fixed: buffer parsing malformed HTML closing body tag
The buffer insert was causing a problem with the html closing tag & should now be fixed with this release.
Thanks Chen
That update you did a while back so that 'Save' buttons were embedded into more themes setting seems to have gone. In this latest version again I have to scroll all the way to the bottom of the screen to 'Save' any changes I've made.
I can't remember if I asked you before if it was possible to put one save at the top as well as the bottom. That means that when the content box is updated you can save it from there, rather than go to the bottom.
Perhaps I did that as a custom edit & neglected to add it to the stable package. I can't remember at the moment.
I'll take a look & rig something up.
Quote from: Chen Zhen on June 19, 2023, 10:15:09 AMPerhaps I did that as a custom edit & neglected to add it to the stable package. I can't remember at the moment.
I'll take a look & rig something up.
Thank you
Version 1.7 is now available with the requested changes.
This version only supports the SMF 2.1.X branch going forward.
Anyone using the SMF 2.0.X branch can use version 1.6 which is available in the archive download section.
Thanks Chen
That's a really nice touch with the change of colour for the save button
CSS3 and JQuery make it easy.