News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to Insert One banner above all

Started by Streamlife, November 01, 2014, 01:08:44 PM

Previous topic - Next topic

Streamlife

Hello! back

I can't find my answer so I write here.

I want to put a banner ( is a mp3 player ) on the top on page. I found forum where they say to put the code below the <body> tag in the index.templates.php but it doesn't work. I tried to put the code in several places but the site doesn't display anymore if I do that.

In the file the <body> tag looks like this :

i found this Code into one part of my Index.template.css

</head>
<body>';





}


And the script to insert is :

<!-- Wikplayer http://www.wikplayer.com -->
<script type="text/javascript" src="http://www.wikplayer.com/code.js"
data-config="{'skin':'skins/wikfull/funkyLady/skin.css','volume':100,'autoplay':true,'shuffle':false,'repeat':1,'showcomment':false,'marqueetexton':true,'placement':'top','showplaylist':false,'playlist':[{'title':'love-hate','url':'https%3A%2F%2Fdl.dropbox.com%2Fs%2Fqnxhbjnzgql9ecj%2Flove-hate.mp3%3Fdl%3D0'}]}" ></script>
<!-- Wikplayer code end -->

Where should I put the script to work please ?

i try to do this But Does work ! lol

[code]</head>
<body>';
<!-- Wikplayer http://www.wikplayer.com -->
<script type="text/javascript" src="http://www.wikplayer.com/code.js"
data-config="{'skin':'skins/wikfull/funkyLady/skin.css','volume':100,'autoplay':true,'shuffle':false,'repeat':1,'showcomment':false,'marqueetexton':true,'placement':'top','showplaylist':false,'playlist':[{'title':'love-hate','url':'https%3A%2F%2Fdl.dropbox.com%2Fs%2Fqnxhbjnzgql9ecj%2Flove-hate.mp3%3Fdl%3D0'}]}" ></script>
<!-- Wikplayer code end -->



}
[/code]

This is a example Wheer i want Insert the player

http://skylien.es.tl/Crear-intro-sin-programas-1.htm


The Web from i get the code are this one

http://www.wikplayer.com/

and They give me The code i Put up But no idea where put this code on my index,template or Index.css 

Thanks in advance

my site

www.Vskgaming.com.ar/foro

Am ussing SMF 2.0.7
and i use Red Clique Theme

Best regards

kat

If I wanted to do that, I think I'd create a block using Simple Portal. The blocks can be made to appear anywhere, within reason, I believe.

Streamlife

#2
Sup There @K hmm i dont think SO,, am ussing ADK portal, But The Block are For up Area With a limit

Example Go here and See the Vid i post from hallowen I think That the limit to a block

www.vskgaming.com.ar/foro

See pic Below
http://i.imgur.com/hnLlaKq.jpg

Also one block are Center of View and my code Take all Screen  Side to side

                               My Scrip are like this Arrow
<---------------------------------------------------------------------------------->

and portal's have one Limit becouse u lose the view of page
               [----------------------------------------------]
                                 portals


i need put this code between head and body  all say are simple but i can't found the Right place to set it! i just need that




putting it in a block

looks like this

http://i.imgur.com/915NhOb.jpg


kat

Thing is, there's so much stuff, there, already, that I couldn't even begin to know where to start, to be honest.

In index.template.php there's this:

// Custom banners and shoutboxes should be placed here, before the linktree.

You could try putting it under that. Not sure it's what you want, entirely, though.

Streamlife

nope lol i get this screen ( Same as allways when i put the code in one random place


http://i.imgur.com/hn6i4Tk.png

i think We miss some  comand Like   echo or echo '
      </div>
   </div></div>
        </div>';

dunoo someting like that

The web page say


Well done! Your Wikplayer has been created.
Please place the code for your music player into your HTML page, immediately under the beginning of the <body> tag or <body ...
(For Tumblr and Blogger blog, please read instructions below this page. For further help, visit our forum!)
http://www.wikplayer.com/#instructions

Pipke

You should attach your index.template.php, then someone i think will implent the code for you, also would be handy a screenshot of your site page with an arrow or something to point where you want the banner (code)  to be placed exactly.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Streamlife

Quote from: Pipke on November 02, 2014, 04:29:25 AM
You should attach your index.template.php, then someone i think will implent the code for you, also would be handy a screenshot of your site page with an arrow or something to point where you want the banner (code)  to be placed exactly.



Pipke i dont need Some one Do it for me, i want to learn and pass on my knowledge as I always do, I am not like those who get help and never appear or give thanks 

besides... all u are Asking are aready on post, try to read all what i put Above.

regards.

kat

If we had the code, we could try things out...

Can't exactly copy/paste this... http://www.wikplayer.com/images/demo1.jpg

Streamlife

Nope @K Does Work. I Try it On Every Template I Found on my Forum, My theme and all rest ( just to try ) and nothing happend, Same white Screen

On that picture Where This Person Set the code? into Style.css? i going to try it there and see what happend, Cant belive this is tuning so hard to  made Is just a Simple java Scrip why The template Dont Take the code, maybe we miss another Letter or Sinbol like   ; <-- to close the Codes, ( i try it aready too  ) Sigh..... no clue,, no clue, i just keep trying

kat

No point in it going into a css file.

As I said, if we had the actual code to use, we could try some things out.

A picture of the code's oretty pointless. Like going back to the days of typing code out, on an old Spectrum...

Illori

echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<!-- Wikplayer http://www.wikplayer.com -->
<script type="text/javascript" src="http://www.wikplayer.com/code.js"
data-config="{\'skin\':\'skins/wikfull/funkyLady/skin.css\',\'volume\':100,\'autoplay\':true,\'shuffle\':false,\'repeat\':1,\'showcomment\':false,\'marqueetexton\':true,\'placement\':\'top\',\'showplaylist\':false,\'playlist\':[{\'title\':\'love-hate\',\'url\':\'https%3A%2F%2Fdl.dropbox.com%2Fs%2Fqnxhbjnzgql9ecj%2Flove-hate.mp3%3Fdl%3D0\'}]}" ></script>
<!-- Wikplayer code end --><div id="header"><div class="frame">
<div id="top_section">


you need to escape quotes like i did and put it in that location.

Streamlife

greetings.

So i Try Illori Put there and The site now dont crash (It is an advance)

but nothing appears, mayb I'm doing something wrong

With Code
http://i.imgur.com/lQxkuWm.png
Without code
http://i.imgur.com/Qam66CR.png
i Remove that Coma ; <----- like picture @K Show me

But like i say Above, With the Code Illori say The site now dont crash


PD;:
on this part of code i need fill With Some number?
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '

Streamlife

Skip What i Say Above i Refresh the page 3 times and now i have the White Screen again and this time say this


syntax error, unexpected T_ECHO, expecting ',' or ';'

Illori

that code worked just as is with the default curve theme. if you modified it in anyway then it is on you to figure out why it broke.

Shambles

Quote from: Streamlife
syntax error, unexpected T_ECHO, expecting ',' or ';'

You need to replace that semicolon:

    echo '
</head>
<body>';   <==========

Advertisement: