Fred the bat

Please post any support questions here. Guest posting is allowed
Guest

Fred the bat

Post by Guest » Fri Mar 29, 2019 12:16 pm

Hi,
is it possible to show the bat only in specifies forums instead of the index page?
Best regards, Olli

Administrator
Site Admin
Posts: 396
Joined: Tue Nov 18, 2014 11:30 am

Re: Fred the bat

Post by Administrator » Fri Mar 29, 2019 1:37 pm

Hi Olli

Yes of course, but you will need to do some editing.

DISABLE

fredthebat

OPEN

hifikabin/fredthebat/styles/all/template/event/overall_header_body_before.html

FIND

{% if S_INDEX %}

CHANGE TO

{% if FORUM_ID eq x %}

where x is the id of the forum where you would like fred to show. eg this support forum has a id of 15

Code: Select all

https://phpbb.hifikabin.me.uk/viewforum.php?f=15
SAVE>UPLOAD>ENABLE

Olli

Re: Fred the bat

Post by Olli » Fri Mar 29, 2019 2:09 pm

Great, Thank you for the quick answer and also this funny ext.
This is what I was thinking :-) - I just could not figure out how to change the S_INDEX...
...is it possible to put it simultan in two or more Forums?
BTW, the second File (overall_header_head_append.html) had to be changed in the same way :-)

Administrator
Site Admin
Posts: 396
Joined: Tue Nov 18, 2014 11:30 am

Re: Fred the bat

Post by Administrator » Fri Mar 29, 2019 4:42 pm

:oops: of course you should also edit the other file in events. I forgot that one (and didn't test before posting, that'll teach me :roll: )

In both files replace

{% if S_INDEX %}

with

{% if FORUM_ID in [x, y] %}

where x and y are your forum id numbers. You can have as many as you like, just separate them with a , followed by a space. Note that the forum id's are in square brackets not the curly ones that contain the whole code.

Glad you like Fred. Hes an old friend :mrg:

Olli

Re: Fred the bat

Post by Olli » Mon Apr 01, 2019 9:59 am

Administrator wrote:
Fri Mar 29, 2019 4:42 pm
:oops: of course you should also edit the other file in events. I forgot that one (and didn't test before posting, that'll teach me :roll: )

In both files replace

{% if S_INDEX %}

with

{% if FORUM_ID in [x, y] %}

where x and y are your forum id numbers. You can have as many as you like, just separate them with a , followed by a space. Note that the forum id's are in square brackets not the curly ones that contain the whole code.
No probs, I figured it out myself :-)
Administrator wrote:
Fri Mar 29, 2019 4:42 pm
Glad you like Fred. Hes an old friend :mrg:
It fits perfectly to the Transylvania Part of the Forum :-D
Only to does not like to scroll... It dissapears when scrolling...

Administrator
Site Admin
Posts: 396
Joined: Tue Nov 18, 2014 11:30 am

Re: Fred the bat

Post by Administrator » Mon Apr 01, 2019 10:19 am

Olli wrote:
Mon Apr 01, 2019 9:59 am
Administrator wrote:
Fri Mar 29, 2019 4:42 pm
<snip>
Glad you like Fred. Hes an old friend :mrg:
It fits perfectly to the Transylvania Part of the Forum :-D
Only to does not like to scroll... It dissapears when scrolling...
He likes flying on the ceiling :roll: His position is proportional to the height of the page (so a longer page shows less of Fred) I need to revisit the code and see if I can make the code absolute rather than the proportional it is now.

Olli

Re: Fred the bat

Post by Olli » Mon Apr 01, 2019 4:36 pm

Sorry, wrong layout in post before, corrected now, pls. delete the unnecessary...
Resolved! - I changed the "fredthebat.css" content:

Code: Select all

#fredthebat {
Position: Fixed;                               /* originally:  position: absolute;  */
background: url("./images/cursor_fred.gif") 0 0 no-repeat;
width: 75px;
height: 30px;
display: none;
z-index: 100;
}
.hasjs #fredthebat {
display: block
}
Best regards, Olli

Administrator
Site Admin
Posts: 396
Joined: Tue Nov 18, 2014 11:30 am

Re: Fred the bat

Post by Administrator » Wed Apr 03, 2019 9:06 am

Yup, thats got him on a lead now. Thanks, as always a fresh set of eyes spots it quicker :smt023

I am 99.9% certain there was something else I had to do with Fred this year, but I just can not remember what it was :smt017

No doubt it will come to me 4 weeks after I have submitted it to the CDB again :roll:

I'll put some notes in the CDB topic about how to have Fred on different pages, thanks for the poke.

Olli

Re: Fred the bat

Post by Olli » Wed Apr 03, 2019 1:51 pm

Administrator wrote:
Wed Apr 03, 2019 9:06 am
Yup, thats got him on a lead now. Thanks, as always a fresh set of eyes spots it quicker :smt023
You´re welcome, it was a pleasure!
Administrator wrote:
Wed Apr 03, 2019 9:06 am
I am 99.9% certain there was something else I had to do with Fred this year, but I just can not remember what it was :smt017

No doubt it will come to me 4 weeks after I have submitted it to the CDB again :roll:

I'll put some notes in the CDB topic about how to have Fred on different pages, thanks for the poke.
Maybe the distance between Fred and the Mousepointer? - once in a while Fred interfears with the pointer... I slowed down the horizontal movement to avoid this...

Administrator
Site Admin
Posts: 396
Joined: Tue Nov 18, 2014 11:30 am

Re: Fred the bat

Post by Administrator » Wed Apr 03, 2019 4:36 pm

*slaps forehead* that was it

Try this as the css file contents

Code: Select all

#fredthebat {
	position: fixed;
	background: url("./images/cursor_fred.gif") 0 0 no-repeat;
	margin-left: 20px;
	width: 75px;
	height: 30px;
	display: none;
	z-index: 100;
}
.hasjs #fredthebat {
	display: block
}

Code: Select all

margin-left: 20px; 
shifts Fred away from the pointer making navigation a wee bit easier.