Adding content to bottom/footer


(Toby Nieboer) #1

I’m trying to add some JS to the footer of my forum using the Content menu. However it doesn’t seem to be getting added in a way that the browser recognises. When viewing the source I would expect to see:

<footer id="bottom"><script>blahblah</script></footer>

but instead the footer tag is empty and I get:

PreloadStore.store("customHTML",{"top":"","bottom":"<script>blah blah</script>"});

and the script is not working correctly. If I’m understanding correctly the PreloadStore is storing the code to be output whenever the footer is generated, but this doesn’t seem to be happening. Is this something I’m doing wrong or a bug?


(Jeff Atwood) #2

Does something simple like alert() work there? Could be a bug.


(Toby Nieboer) #3

Nope, alert doesn’t work either.

PreloadStore.store("customHTML",{"top":"","bottom":"<script>alert('Blah!');<\/script>"});
...
<footer id='bottom'></footer>

(Daniel Ritchie) #4

I think it’s a bug.

On topics list pages, the customHTML configured there is appearing in PreloadStore.store(“customHTML”,“bottom”:"") but the HTML is not inserted.

“top”: is working site-wide, so far as I’ve seen.

“bottom”: works on post view, but not topics list view.


(Jeff Atwood) #5

Can you add this to your list of bugs to fix tomorrow @neil?


(Neil Lalonde) #6

As far as I can tell, that “bottom” content was always only rendered at the end of a topic. It was trolling when it said “HTML that will be added at the bottom of every page.” :troll:

I fixed it so it really does render at the bottom of every page.


(Mittineague) #7

You aer saying that even when a site has thousands of topics, when / if someone gets to the bottom of the list, the footer will now render?

Or that it will show, only to be “bumped down” when the next JSON loads in? If so it seems that would be a bit annoying.


(Kane York) #8

I take it that it will now show on /top, and lists that are normally pretty empty like /new and /unread.


(Daniel Ritchie) #9

:troll: Consider me trolled.

Thanks for changing it. I think the real troll was the “bottom of every page” blob still showing up in page source… but that’s also what got it fixed.


(Jeff Atwood) #10

This topic was automatically closed after 3 days. New replies are no longer allowed.