Greetings!
Basics:
I use SMF 1.1.4 and TP 0.9.8
(Please donââ,¬â,,¢t blame me because of the Version Numbers.)
I like to run a nice little script to show a spinning wheel on my frontpage.
The source of the script:
http://www.mibhouse.org/pokemon_jojo/public/js/pbb-magicwheel/pbb-magicwheel.html
For my personal use, I have deleted the info and settings box and use only the wheel part.
My version of the wheel:
http://www.firopolis.de/forum/wheel/wheel.php
and / or
http://www.firopolis.de/forum/wheel/wheel.html
Quest:
I want to show this (php) file on my frontpage ââ,¬â€œ inside a php-block.
Step One:
I choose a php-block and try to include it.
include ('http://www.firopolis.de/forum/wheel/wheel.php');
Well noting happens. I get the block but no content.
After that I have added some plain text to verify that the include is working.
Now I get my text but nothing more.
Step Two:
I have deleted the php and echo stuff and put the code into an html-block.
(Because of that I have also a wheel.html)
Same result, nothing is shown.
Step Three:
I have created an html article and put all the stuff of the html file into this article.
Wonder what happens?
The wheel is shown on my frontpage, but it donââ,¬â,,¢t keep any borders.
I have added a temporary ââ,¬Å"Plain Testboxââ,¬Â to make the problem more obvious.
My frontpage:
http://www.firopolis.de/forum/index.php
Question is:
How to include the wheel.php into a php block.
The wheel should stay inside the block and the whole block should move down when someone is using the above navigation.
(Try to klick on Letzte Beiträge (+/-) get the idea.)
Any help is appreciated.
When you paste the code, click the <> sign on the editor, paste the code and save and check, if it still looks the same, edit the article again and click the <> again, place the curser infornt of the code and click the backtab so it moves up to the top of the editorframe, save again and check the article.
First, thanks for your kind reply.
Second.
Iââ,¬â,,¢m sorry, but I have no idea of what you tell me.
What do you mean with the <> sign?
Switch to Source code?
Well anyway. I donââ,¬â,,¢t want to have the code inside an article.
My code is working as ââ,¬Å"stand aloneââ,¬Â and I would like to include this into a php-block.
I have done this with navigation files before.
At the moment the Letzte Beiträge (+/-) part is an external file
(Source: http://www.firopolis.de/forum/PortalStartseite.php (missing SMF functions because TP take care of that))
I also use a left navigation for some boards and all of them are external.
(Example: Left Navigation: http://www.firopolis.de/forum/index.php/board,45.0.html)
(External means, not written with the TP editor but on my webspace of course.)
So, an article is only my second choice, because I am more flexible with positioning of blocks.
Is there a reason that you can't just paste the php code into a php article and dispense with the "include" altogether?
:'( yes
I don't know how to format the php file. I have no clue where to put an echo or close it.
Especially when the file calls some <script type=" ââ,¬Â¦
and if some script or css is inside the file, I have no chance to format the file in a way that a php-block donââ,¬â,,¢t send out error messages.
Itââ,¬â,,¢s a shame, I know.
I used to try it this time (again) but after I put the code of the html-file into a html-block (with no positiv result) I quit to find out where to warp echos around the code.
Can you give us either the php code or the html code so we can help you figure it out? Please put the code into code tags -- use the # key in the reply form -- and we might be able to work it out together.
Of course I can give the code.
The working examples:
http://www.firopolis.de/forum/wheel/wheel.php
and / or
http://www.firopolis.de/forum/wheel/wheel.html
Code of the PHP Version:
<head>
<link rel="stylesheet" type="text/css" href="http://www.firopolis.de/forum/wheel/styles.css" />
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2.1-core-yc.js" ></script>
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2-more.js" ></script>
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/pbb-magicwheel-1.0.js" ></script>
<style type="text/css"><!--
/*
Magic Wheel CSS
*/
.loading {
background: url('wheel-loader.gif') center center no-repeat;
}
#magicwheel {
position: absolute;
}
.tip {
position: absolute;
visibility: hidden;
top: 0;
left: 0;
background: url('arrow.png') bottom center no-repeat;
z-index: 1000;
padding-bottom: 6px;
}
.tip span {
padding: 1px 10px;
background: black;
color: #fff;
font-weight: bold;
}
#magicwheel .icon, #magicwheel .ref {
position: absolute;
border: none;
visibility: hidden;
}
/*
Settings CSS
*/
.box {
position: absolute;
color: #666;
margin: 10px;
padding: 0px 7px 5px 7px;
background: #f1f1f1;
width: 280px;
z-index: 1000;
}
.slider {
background: #D8D8D8;
height: 10px;
margin-bottom: 7px;
cursor: pointer;
}
.knob {
background: #666;
width: 20px;
height: 10px;
cursor: pointer;
}
--></style>
<script type="text/javascript" >
window.addEvent('domready', function(){
var MyMW = new PBB_MagicWheel($('magicwheel'));
var SLIDEuserIconWidth = new Slider($('SLIDEuserIconWidth'), $('KNOBuserIconWidth'), {
range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],
steps: MyMW.options.iconMaxWidth,
wheel: true,
onChange: function(pos){
MyMW.options.userIconWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconWidth);
var SLIDEuserIconMinWidth = new Slider($('SLIDEuserIconMinWidth'), $('KNOBuserIconMinWidth'), {
range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],
steps: MyMW.options.iconMaxWidth,
wheel: true,
onChange: function(pos){
if(pos > MyMW.options.userIconWidth)
this.set(MyMW.options.userIconWidth);
else
MyMW.options.userIconMinWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconMinWidth);
var SLIDEuserWidth = new Slider($('SLIDEuserWidth'), $('KNOBuserWidth'), {
range: [MyMW.options.minWidth, MyMW.options.maxWidth],
steps: 100,
wheel: true,
onChange: function(pos){
if(pos > MyMW.options.maxWidth - MyMW.options.userIconWidth)
this.set(MyMW.options.maxWidth - MyMW.options.userIconWidth);
else
MyMW.options.userWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userWidth);
var SLIDEuserHeight = new Slider($('SLIDEuserHeight'), $('KNOBuserHeight'), {
range: [MyMW.options.minHeight, MyMW.options.maxHeight],
steps: 100,
wheel: true,
onChange: function(pos){
MyMW.options.userHeight = pos / MyMW.icons.length;
MyMW.checkSettings();
}
}).set(MyMW.options.userHeight * MyMW.icons.length);
var SLIDEuserSpeed = new Slider($('SLIDEuserSpeed'), $('KNOBuserSpeed'), {
range: [-1000, 1000],
steps: 200,
wheel: true,
onChange: function(pos){
MyMW.options.userSpeed = pos / 1000;
MyMW.checkSettings();
}
}).set(MyMW.options.userSpeed * 1000);
var SLIDEuserIconOpacity = new Slider($('SLIDEuserIconOpacity'), $('KNOBuserIconOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
MyMW.options.userIconOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconOpacity * 10);
var SLIDEuserIconMinOpacity = new Slider($('SLIDEuserIconMinOpacity'), $('KNOBuserIconMinOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
if(pos / 10 > MyMW.options.userIconOpacity)
this.set(MyMW.options.userIconOpacity * 10);
else
MyMW.options.userIconMinOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconMinOpacity * 10);
var SLIDEuserRefOpacity = new Slider($('SLIDEuserRefOpacity'), $('KNOBuserRefOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
MyMW.options.userRefOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userRefOpacity * 10);
$('add').addEvent('click', function(e){
e.stop();
MyMW.addIcon('icons/new.png', 'icons/new.png', 'Hey i\' the new icon !');
});
});
</script>
</head>
<body>
<?php
echo'
<div id="magicwheel" class="loading">
<a href="http://www.firopolis.de/forum/index.php/board,45.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/Oblivion-48x48.png" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,78.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_risen.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,85.0.html" title="Fallout"><img class="icon" src="http://www.firopolis.de/forum/Themes/Polis_main/images/post/mic_fallout.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,91.0.html" title="Dragon Age"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_dragonage.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,40.0.html" title="Gothic 3"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_g3.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,82.0.html" title="Sacred 2"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_sacred2.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,65.0.html" title="The Witcher"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_twitch.gif" /></a>
</div>
';
?>
</body>
There's no actual php code in there. Just one "echo" statement. You would do better to just use the html:
<link rel="stylesheet" type="text/css" href="http://www.firopolis.de/forum/wheel/styles.css" />
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2.1-core-yc.js" ></script>
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2-more.js" ></script>
<script type="text/javascript" src="http://www.firopolis.de/forum/wheel/pbb-magicwheel-1.0.js" ></script>
<style type="text/css"><!--
/*
Magic Wheel CSS
*/
.loading {
background: url('wheel-loader.gif') center center no-repeat;
}
#magicwheel {
position: absolute;
}
.tip {
position: absolute;
visibility: hidden;
top: 0;
left: 0;
background: url('arrow.png') bottom center no-repeat;
z-index: 1000;
padding-bottom: 6px;
}
.tip span {
padding: 1px 10px;
background: black;
color: #fff;
font-weight: bold;
}
#magicwheel .icon, #magicwheel .ref {
position: absolute;
border: none;
visibility: hidden;
}
/*
Settings CSS
*/
.box {
position: absolute;
color: #666;
margin: 10px;
padding: 0px 7px 5px 7px;
background: #f1f1f1;
width: 280px;
z-index: 1000;
}
.slider {
background: #D8D8D8;
height: 10px;
margin-bottom: 7px;
cursor: pointer;
}
.knob {
background: #666;
width: 20px;
height: 10px;
cursor: pointer;
}
--></style>
<script type="text/javascript" >
window.addEvent('domready', function(){
var MyMW = new PBB_MagicWheel($('magicwheel'));
var SLIDEuserIconWidth = new Slider($('SLIDEuserIconWidth'), $('KNOBuserIconWidth'), {
range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],
steps: MyMW.options.iconMaxWidth,
wheel: true,
onChange: function(pos){
MyMW.options.userIconWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconWidth);
var SLIDEuserIconMinWidth = new Slider($('SLIDEuserIconMinWidth'), $('KNOBuserIconMinWidth'), {
range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],
steps: MyMW.options.iconMaxWidth,
wheel: true,
onChange: function(pos){
if(pos > MyMW.options.userIconWidth)
this.set(MyMW.options.userIconWidth);
else
MyMW.options.userIconMinWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconMinWidth);
var SLIDEuserWidth = new Slider($('SLIDEuserWidth'), $('KNOBuserWidth'), {
range: [MyMW.options.minWidth, MyMW.options.maxWidth],
steps: 100,
wheel: true,
onChange: function(pos){
if(pos > MyMW.options.maxWidth - MyMW.options.userIconWidth)
this.set(MyMW.options.maxWidth - MyMW.options.userIconWidth);
else
MyMW.options.userWidth = pos;
MyMW.checkSettings();
}
}).set(MyMW.options.userWidth);
var SLIDEuserHeight = new Slider($('SLIDEuserHeight'), $('KNOBuserHeight'), {
range: [MyMW.options.minHeight, MyMW.options.maxHeight],
steps: 100,
wheel: true,
onChange: function(pos){
MyMW.options.userHeight = pos / MyMW.icons.length;
MyMW.checkSettings();
}
}).set(MyMW.options.userHeight * MyMW.icons.length);
var SLIDEuserSpeed = new Slider($('SLIDEuserSpeed'), $('KNOBuserSpeed'), {
range: [-1000, 1000],
steps: 200,
wheel: true,
onChange: function(pos){
MyMW.options.userSpeed = pos / 1000;
MyMW.checkSettings();
}
}).set(MyMW.options.userSpeed * 1000);
var SLIDEuserIconOpacity = new Slider($('SLIDEuserIconOpacity'), $('KNOBuserIconOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
MyMW.options.userIconOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconOpacity * 10);
var SLIDEuserIconMinOpacity = new Slider($('SLIDEuserIconMinOpacity'), $('KNOBuserIconMinOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
if(pos / 10 > MyMW.options.userIconOpacity)
this.set(MyMW.options.userIconOpacity * 10);
else
MyMW.options.userIconMinOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userIconMinOpacity * 10);
var SLIDEuserRefOpacity = new Slider($('SLIDEuserRefOpacity'), $('KNOBuserRefOpacity'), {
range: [0, 10],
steps: 10,
wheel: true,
onChange: function(pos){
MyMW.options.userRefOpacity = pos / 10;
MyMW.checkSettings();
}
}).set(MyMW.options.userRefOpacity * 10);
$('add').addEvent('click', function(e){
e.stop();
MyMW.addIcon('icons/new.png', 'icons/new.png', 'Hey i\' the new icon !');
});
});
</script>
<div id="magicwheel" class="loading">
<a href="http://www.firopolis.de/forum/index.php/board,45.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/Oblivion-48x48.png" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,78.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_risen.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,85.0.html" title="Fallout"><img class="icon" src="http://www.firopolis.de/forum/Themes/Polis_main/images/post/mic_fallout.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,91.0.html" title="Dragon Age"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_dragonage.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,40.0.html" title="Gothic 3"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_g3.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,82.0.html" title="Sacred 2"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_sacred2.gif" /></a>
<a href="http://www.firopolis.de/forum/index.php/board,65.0.html" title="The Witcher"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_twitch.gif" /></a>
</div>
Paste that into the source code (not directly into the editor) in an html article and give that a shot. The only thing that might be a problem is the relative paths and URLs to your images. One suggestion is to use full URLs. The other is to rewrite your URLs relative to the Sources directory. It's one of those things that I always have to play around with.
Thanks a lot for your time. Itââ,¬â,,¢s really appreciated.
Mh, I think, I have to clarify some things.
I run this ââ,¬â€œ the html code ââ,¬â€œ already in an html article.
Frontpage: http://www.firopolis.de/forum/index.php
Now I like to avoid articles and use a block instead.
(Because of positioning in the most cases, in this case additionally because of the ââ,¬Å"overlappingââ,¬Â)
If I put the same code into a block, it will show only the pictures.
Because of that, I used the full URLs. As far as I know, this is the most fail-safe way.
Tomorrow I will try to used relative path instead. (Canââ,¬â,,¢t connect to my server at the moment. My computer is recording a TV stream right know and canââ,¬â,,¢t handle web-traffic at the same time.)
In general, I like to avoid the html editor and for that reason I prefer to include a file (from my server) into an php-block ââ,¬â€œ even if the file itself isnââ,¬â,,¢t a ââ,¬Å"realââ,¬Â php file.
The editor is nice to write and format some text, but I need the syntax highlight of the notepad++.
Mainly, I donââ,¬â,,¢t understand why the ââ,¬Å"stand aloneââ,¬Â and the ââ,¬Å"articleââ,¬Â version are working, but not if I include the file. Especially because this file http://www.firopolis.de/forum/PortalStartseite.php , as an example, is of the ââ,¬Å"nearlyââ,¬Â same style. An external php file with a full URL link to a css and script file, with some script inside and included into a php-block.
Anyway, I will report back tomorrow.
Thanks again for your time.
QuoteIf I put the same code into a block, it will show only the pictures
I don't know what that means. I see links along with the pictures. What do you need that is different?
QuoteIn general, I like to avoid the html editor and for that reason I prefer to include a file (from my server) into an php-block ââ,¬â€œ even if the file itself isnââ,¬â,,¢t a ââ,¬Å"realââ,¬Â php file.
That might be the way to go when you're working with a stand-alone file, but you're making a whole lot more trouble than you need to if you do this with TP. You can turn off the html editor -- you can completely delete the folder where the editor is stored -- if you like.
QuoteMainly, I donââ,¬â,,¢t understand why the ââ,¬Å"stand aloneââ,¬Â and the ââ,¬Å"articleââ,¬Â version are working, but not if I include the file.
I don't either. But then I don't know what the actual problem is.
Is it that the block doesn't completely contain the images? You can easily use css to create a div of the proper height and put the images in that.
Quote from: JPDeni on April 15, 2009, 08:18:33 PM
QuoteIf I put the same code into a block, it will show only the pictures
I don't know what that means. I see links along with the pictures. What do you need that is different?
OK, I see.
As emntioned before, the code is working inside an Article. In fact, you have seen, the expected result.
But...
If you have seen my frontpage, maybe you have noticed the wheel has overlapped the Plain Testbox. (The wheel is simply overlapping every contend.) An error which makes the whole thing useless.
And I want a different position and therefor I need a block and not an Article.
Now.
I have deleted the Article from the front-page and put the html-block there instead.
Maybe this will make the problem more obvious.
The Artikel you have seen before is under this link.
http://www.firopolis.de/forum/index.php?page=73
On the new frontpage you will see the same code, but this time it is in a html-bock.
http://www.firopolis.de/forum/index.php.
When I look at the source code for the page with the html block, I see that quite a bit of the code is not there. You need to put in all of the code that I posted earlier.
Shame on me. With rewriting the Portal the sourcecode looks horrid.
I put your code inside the html block, and have redone this just before this post.
<div class="titlebg" style="padding: 4px; font-weight: bold;"><a href="http://www.firopolis.de/forum/index.php?action=tpadmin;blockeditf=138;sesc=b01fea7ca2d66510aaee324bed883877"><img border="0" style="margin-right: 4px;" align="right" src="http://www.firopolis.de/forum/Themes/Polis_main/images/tp-edit.gif" alt="" /></a>Wheel Test 2
</div>
<div class="windowbg" style="padding:4px; " id="block138"><link rel="stylesheet" type="text/css" href="http://www.firopolis.de/forum/wheel/styles.css" /> <script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2.1-core-yc.js" ></script> <script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2-more.js" ></script> <script type="text/javascript" src="http://www.firopolis.de/forum/wheel/pbb-magicwheel-1.0.js" ></script> <style type="text/css"><!--<br /> <br /> /*<br /> Magic Wheel CSS<br /> */<br /> .loading {<br /> background: url('wheel-loader.gif') center center no-repeat;<br /> }<br /> <br /> #magicwheel {<br /> position: absolute;<br /> }<br /> <br /> .tip {<br /> position: absolute;<br /> visibility: hidden;<br /> top: 0;<br /> left: 0;<br /> background: url('arrow.png') bottom center no-repeat;<br /> z-index: 1000;<br /> padding-bottom: 6px;<br /> }<br /> <br /> .tip span {<br /> padding: 1px 10px;<br /> background: black;<br /> color: #fff;<br /> font-weight: bold;<br /> }<br /> <br /> #magicwheel .icon, #magicwheel .ref {<br /> position: absolute;<br /> border: none;<br /> visibility: hidden;<br /> }<br /> <br /> /*<br /> Settings CSS<br /> */<br /> .box {<br /> position: absolute;<br /> color: #666;<br /> margin: 10px;<br /> padding: 0px 7px 5px 7px;<br /> background: #f1f1f1;<br /> width: 280px;<br /> z-index: 1000;<br /> }<br /> <br /> .slider {<br /> background: #D8D8D8;<br /> height: 10px;<br /> margin-bottom: 7px;<br /> cursor: pointer;<br /> }<br /> <br /> .knob {<br /> background: #666;<br /> width: 20px;<br /> height: 10px;<br /> cursor: pointer;<br /> }<br /> --></style> <script type="text/javascript" ><br /> window.addEvent('domready', function(){<br /> var MyMW = new PBB_MagicWheel($('magicwheel'));<br /> <br /> var SLIDEuserIconWidth = new Slider($('SLIDEuserIconWidth'), $('KNOBuserIconWidth'), {<br /> range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],<br /> steps: MyMW.options.iconMaxWidth,<br /> wheel: true,<br /> onChange: function(pos){<br /> MyMW.options.userIconWidth = pos;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userIconWidth);<br /> <br /> var SLIDEuserIconMinWidth = new Slider($('SLIDEuserIconMinWidth'), $('KNOBuserIconMinWidth'), {<br /> range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],<br /> steps: MyMW.options.iconMaxWidth,<br /> wheel: true,<br /> onChange: function(pos){<br /> if(pos > MyMW.options.userIconWidth)<br /> this.set(MyMW.options.userIconWidth);<br /> else<br /> MyMW.options.userIconMinWidth = pos;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userIconMinWidth);<br /> <br /> var SLIDEuserWidth = new Slider($('SLIDEuserWidth'), $('KNOBuserWidth'), {<br /> range: [MyMW.options.minWidth, MyMW.options.maxWidth],<br /> steps: 100,<br /> wheel: true,<br /> onChange: function(pos){<br /> if(pos > MyMW.options.maxWidth - MyMW.options.userIconWidth)<br /> this.set(MyMW.options.maxWidth - MyMW.options.userIconWidth);<br /> else<br /> MyMW.options.userWidth = pos;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userWidth);<br /> <br /> var SLIDEuserHeight = new Slider($('SLIDEuserHeight'), $('KNOBuserHeight'), {<br /> range: [MyMW.options.minHeight, MyMW.options.maxHeight],<br /> steps: 100,<br /> wheel: true,<br /> onChange: function(pos){<br /> MyMW.options.userHeight = pos / MyMW.icons.length;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userHeight * MyMW.icons.length);<br /> <br /> var SLIDEuserSpeed = new Slider($('SLIDEuserSpeed'), $('KNOBuserSpeed'), {<br /> range: [-1000, 1000],<br /> steps: 200,<br /> wheel: true,<br /> onChange: function(pos){<br /> MyMW.options.userSpeed = pos / 1000;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userSpeed * 1000);<br /> <br /> var SLIDEuserIconOpacity = new Slider($('SLIDEuserIconOpacity'), $('KNOBuserIconOpacity'), {<br /> range: [0, 10],<br /> steps: 10,<br /> wheel: true,<br /> onChange: function(pos){<br /> MyMW.options.userIconOpacity = pos / 10;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userIconOpacity * 10);<br /> <br /> var SLIDEuserIconMinOpacity = new Slider($('SLIDEuserIconMinOpacity'), $('KNOBuserIconMinOpacity'), {<br /> range: [0, 10],<br /> steps: 10,<br /> wheel: true,<br /> onChange: function(pos){<br /> if(pos / 10 > MyMW.options.userIconOpacity)<br /> this.set(MyMW.options.userIconOpacity * 10);<br /> else<br /> MyMW.options.userIconMinOpacity = pos / 10;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userIconMinOpacity * 10);<br /> <br /> var SLIDEuserRefOpacity = new Slider($('SLIDEuserRefOpacity'), $('KNOBuserRefOpacity'), {<br /> range: [0, 10],<br /> steps: 10,<br /> wheel: true,<br /> onChange: function(pos){<br /> MyMW.options.userRefOpacity = pos / 10;<br /> MyMW.checkSettings();<br /> }<br /> }).set(MyMW.options.userRefOpacity * 10);<br /> <br /> $('add').addEvent('click', function(e){<br /> e.stop();<br /> MyMW.addIcon('icons/new.png', 'icons/new.png', 'Hey i\' the new icon !');<br /> });<br /> });<br /> </script><br /><div id="magicwheel" class="loading"> <a href="http://www.firopolis.de/forum/index.php/board,45.0.html" title="Risen"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/Oblivion-48x48.png" /></a> <a href="http://www.firopolis.de/forum/index.php/board,78.0.html" title="Risen"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_risen.gif" /></a> <a href="http://www.firopolis.de/forum/index.php/board,85.0.html" title="Fallout"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/Polis_main/images/post/mic_fallout.gif" /></a> <a href="http://www.firopolis.de/forum/index.php/board,91.0.html" title="Dragon Age"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_dragonage.gif" /></a> <a href="http://www.firopolis.de/forum/index.php/board,40.0.html" title="Gothic 3"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_g3.gif" /></a> <a href="http://www.firopolis.de/forum/index.php/board,82.0.html" title="Sacred 2"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_sacred2.gif" /></a> <a href="http://www.firopolis.de/forum/index.php/board,65.0.html" title="The Witcher"><img alt="" class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_twitch.gif" /></a> </div></div></div><div class="tborder" style="margin-bottom: 20px;">
<div class="windowbg" style="padding:4px; " id="block131"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
It's all there, but in a looong row. Pfff.
Looks strange also.
edit.
Have deleted the damm
<div class="titlebg" style="padding: 4px; font-weight: bold;"><a href="http://www.firopolis.de/forum/index.php?action=tpadmin;blockeditf=138;sesc=b01fea7ca2d66510aaee324bed883877"><img border="0" style="margin-right: 4px;" align="right" src="http://www.firopolis.de/forum/Themes/Polis_main/images/tp-edit.gif" alt="" /></a>Wheel Test 2
</div>
<div class="windowbg" style="padding:4px; " id="block138"><link rel="stylesheet" type="text/css" href="http://www.firopolis.de/forum/wheel/styles.css" /><br /><script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2.1-core-yc.js" ></script><br /><script type="text/javascript" src="http://www.firopolis.de/forum/wheel/mootools-1.2-more.js" ></script><br /><script type="text/javascript" src="http://www.firopolis.de/forum/wheel/pbb-magicwheel-1.0.js" ></script><br /><style type="text/css"><!--<br /><br />/*<br />Magic Wheel CSS<br />*/<br />.loading {<br />background: url('wheel-loader.gif') center center no-repeat;<br />}<br /><br />#magicwheel {<br />position: absolute;<br />}<br /><br />.tip {<br />position: absolute;<br />visibility: hidden;<br />top: 0;<br />left: 0;<br />background: url('arrow.png') bottom center no-repeat;<br />z-index: 1000;<br />padding-bottom: 6px;<br />}<br /><br />.tip span {<br />padding: 1px 10px;<br />background: black;<br />color: #fff;<br />font-weight: bold;<br />}<br /><br />#magicwheel .icon, #magicwheel .ref {<br />position: absolute;<br />border: none;<br />visibility: hidden;<br />}<br /><br />/*<br />Settings CSS<br />*/<br />.box {<br />position: absolute;<br />color: #666;<br />margin: 10px;<br />padding: 0px 7px 5px 7px;<br />background: #f1f1f1;<br />width: 280px;<br />z-index: 1000;<br />}<br /><br />.slider {<br />background: #D8D8D8;<br />height: 10px;<br />margin-bottom: 7px;<br />cursor: pointer;<br />}<br /><br />.knob {<br />background: #666;<br />width: 20px;<br />height: 10px;<br />cursor: pointer;<br />}<br />--></style><br /><br /><script type="text/javascript" ><br />window.addEvent('domready', function(){<br />var MyMW = new PBB_MagicWheel($('magicwheel'));<br /><br />var SLIDEuserIconWidth = new Slider($('SLIDEuserIconWidth'), $('KNOBuserIconWidth'), {<br />range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],<br />steps: MyMW.options.iconMaxWidth,<br />wheel: true,<br />onChange: function(pos){<br />MyMW.options.userIconWidth = pos;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userIconWidth);<br /><br />var SLIDEuserIconMinWidth = new Slider($('SLIDEuserIconMinWidth'), $('KNOBuserIconMinWidth'), {<br />range: [MyMW.options.iconMinWidth, MyMW.options.iconMaxWidth],<br />steps: MyMW.options.iconMaxWidth,<br />wheel: true,<br />onChange: function(pos){<br />if(pos > MyMW.options.userIconWidth)<br />this.set(MyMW.options.userIconWidth);<br />else<br />MyMW.options.userIconMinWidth = pos;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userIconMinWidth);<br /><br />var SLIDEuserWidth = new Slider($('SLIDEuserWidth'), $('KNOBuserWidth'), {<br />range: [MyMW.options.minWidth, MyMW.options.maxWidth],<br />steps: 100,<br />wheel: true,<br />onChange: function(pos){<br />if(pos > MyMW.options.maxWidth - MyMW.options.userIconWidth)<br />this.set(MyMW.options.maxWidth - MyMW.options.userIconWidth);<br />else<br />MyMW.options.userWidth = pos;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userWidth);<br /><br />var SLIDEuserHeight = new Slider($('SLIDEuserHeight'), $('KNOBuserHeight'), {<br />range: [MyMW.options.minHeight, MyMW.options.maxHeight],<br />steps: 100,<br />wheel: true,<br />onChange: function(pos){<br />MyMW.options.userHeight = pos / MyMW.icons.length;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userHeight * MyMW.icons.length);<br /><br />var SLIDEuserSpeed = new Slider($('SLIDEuserSpeed'), $('KNOBuserSpeed'), {<br />range: [-1000, 1000],<br />steps: 200,<br />wheel: true,<br />onChange: function(pos){<br />MyMW.options.userSpeed = pos / 1000;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userSpeed * 1000);<br /><br />var SLIDEuserIconOpacity = new Slider($('SLIDEuserIconOpacity'), $('KNOBuserIconOpacity'), {<br />range: [0, 10],<br />steps: 10,<br />wheel: true,<br />onChange: function(pos){<br />MyMW.options.userIconOpacity = pos / 10;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userIconOpacity * 10);<br /><br />var SLIDEuserIconMinOpacity = new Slider($('SLIDEuserIconMinOpacity'), $('KNOBuserIconMinOpacity'), {<br />range: [0, 10],<br />steps: 10,<br />wheel: true,<br />onChange: function(pos){<br />if(pos / 10 > MyMW.options.userIconOpacity)<br />this.set(MyMW.options.userIconOpacity * 10);<br />else<br />MyMW.options.userIconMinOpacity = pos / 10;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userIconMinOpacity * 10);<br /><br />var SLIDEuserRefOpacity = new Slider($('SLIDEuserRefOpacity'), $('KNOBuserRefOpacity'), {<br />range: [0, 10],<br />steps: 10,<br />wheel: true,<br />onChange: function(pos){<br />MyMW.options.userRefOpacity = pos / 10;<br />MyMW.checkSettings();<br />}<br />}).set(MyMW.options.userRefOpacity * 10);<br /><br />$('add').addEvent('click', function(e){<br />e.stop();<br />MyMW.addIcon('icons/new.png', 'icons/new.png', 'Hey i\' the new icon !');<br />});<br />});<br /></script><br /><br /><div id="magicwheel" class="loading"><br /><a href="http://www.firopolis.de/forum/index.php/board,45.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/Oblivion-48x48.png" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,78.0.html" title="Risen"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_risen.gif" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,85.0.html" title="Fallout"><img class="icon" src="http://www.firopolis.de/forum/Themes/Polis_main/images/post/mic_fallout.gif" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,91.0.html" title="Dragon Age"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_dragonage.gif" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,40.0.html" title="Gothic 3"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_g3.gif" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,82.0.html" title="Sacred 2"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_sacred2.gif" /></a><br /><a href="http://www.firopolis.de/forum/index.php/board,65.0.html" title="The Witcher"><img class="icon" src="http://www.firopolis.de/forum/Themes/default/images/post/mic_twitch.gif" /></a><br /><br /></div></div></div><div class="tborder" style="margin-bottom: 20px;">
<div class="windowbg" style="padding:4px; " id="block131"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
But this ist strange.
url('arrow.png'
Looks like a wrong encoding of character entities to me.
If it's working in an article, and you want to be able have it in a block so that you can place it, why not just use a single article block?
Now I'll shut up and let you guys get back to it. ;)
ZarPrime
I really don't know. I'm sorry I can't help any more. I should just stick to php. :)
Greetings!
Single article block sounds logical. I have tried this already before posting initially with no positive result.
This wheel looks so beautiful, and I thought, that there could be a simple error and I am missing a simple "close this" or "add a >'; here".
I have to struggle with it a bit more, I think.
Anyway. I am deeply grateful for your time and thoughtfulness.
Edit
Well, I think, I have an idea.
The script is fetching the screen size.
I have added another example with some colors to make clear what happens.
http://www.firopolis.de/forum/index.php?page=75
Now, this is no longer a TP problem but a question of the js-script.
(Enter some rude words here)
Thanks for your time – again.
Sorry for the double post, but this one seem to be worth it.
Finally I have solved the problem.
First:
I deleted the this.screenSize settings and functions in the js-file.
Then I changed the predefined height & width settings in the script.
Second:
I changed the positioning in the css-file.
Third:
I create an html-article for the code and links andââ,¬Â¦
(An html-block is still showing nothing. Really strange.)
Fourth:
I create an ââ,¬Å"one articleââ,¬Â block.
Result:
http://www.firopolis.de/forum/index.php
Done.
Really nice imho
I canââ,¬â,,¢t say how much I appreciated your patience and your kind helpfulness.
Thanks a lot for your help while this process.
Very cool! 8)
Sometimes it just helps to explain the problem to someone else in order to help get your own brain working.
I'm really pleased that you solved it. Looks very nice. :)
actually.... thats quite impressive... i like.
well done.
this is a great item and would be great to promote our store within our site but how can I get my hands on the one that you actually got to work?
or exactly the files you edited and the exact edits...did that make sense?
Thanks for the kind replies!
@DarkAngel612
You will find the original source code (and an example) in the very first topic.
Inside the pbb-magicwheel.html file that comes with the code, you have to delete the both divââ,¬â,,¢s which are showing the information and settings fields.
Than you have to change the css part from
#magicwheel
position:absolut;
to
#magicwheel
{
position:relative;
display:block;
margin:auto;
}
This will keep the wheel inside the article and will center it.
Finally there is some java-script in the html-file. If havenââ,¬â,,¢t found the time to sort out which parts are necessary. Imho most of them are obsolete.
In the pbb-magicwheel-1.0.js you have to delete all this.screenSize entries.
If you look at the code, you will understand what I am talking about.
(You can keep them if you want to use the wheel as a stand-alone page. You can warp some TP parts around it. You have to delete them if you want the wheel stay inside an article.)
You can try to make it work, if you want. Learning by doing.
I have attached the files which I have in use at the moment and the original files.
Feel free to use them.
a.) You have to change the links to the js ââ,¬â€œ files and of course the links to the icons.
b.) You can change some options at the very top of the pbb-magicwheel-1.0.js. Min/Max height / weight of the wheel, IconWidth, etc.
If you play around with the settings in the ââ,¬Å"original exampleââ,¬Â you will see what happens.
Now, you have to create an html-article which holds the code of the wheel.html.
As mentioned, I still havenââ,¬â,,¢t managed to put it directly into a html-block. (Maybe my TP files are outdated, I donââ,¬â,,¢t know.)
This Article is working like an normal TP-Article. You can use it and not further steps are necessary .
Personally, I use to have a block, because of the positioning possibility.
If you want a block, this is the last step.
Create a ââ,¬Å"one articleââ,¬Â block and link to the article.
Done.
I hope, that you understand what I am talking about. I have minor skills in explain something in a foreign language.
Feel free to ask if something isnââ,¬â,,¢t working.
yup trying is learning and this will give me something to try as I get time...ty
I would even not mind having it in a block either...beats the static images I have right now...get people to pay a bit more attention to them....lol
Mmh, maybe you get me wrong.
The necessary html code is in the wheel.html. Put it into an article and change the path to fit you needs. You can use the pbb-magicwheel-1.0.js "as is".
Every edited file is in the attachment.
Should cost you nearly no time.
The links are absolute. You can use them for a short while to see how things working.
Finally you have to change the path to your own server, but for a quick start...
ok thanks, I copied the html file you posted so will give it a go and see what happens.
I do though need to put my images into that "icons" folder right?
Sorry, little delay. Had to grab some sleep between 8am and now.
You can use every icon you want. I have linked to the smf icon folder, because for the moment I use my own message icons. It's a kind of "normal" html link which uses an icon as formatting and not themthing like color or size.
Additionally the script will re-size the icon to a predefined height/width.
The
userIconWidth: 56,
userIconMinWidth: 30,
in the pbb-magicwheel-1.0.js handle this.
no problem, i have a mother with alzheimers and my hours have flipped so that now I am a vampire...lol sleep from 7 am (if lucky) til 4 pm
I have been using SMF/TP for about 5 years now and can do some manual editing/butchering...lol and am so thrilled that I don't kill it just delete and resave and there it is. Any other type of coding is quite frightening...lol
Thanks to the hard work of the creators that is possible.
I am going to try this over the weekend so that I can see if it behaves...in the block I intend to try it in
Thanks.