TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 446
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 186
  • Total: 187
  • @rjen

Page (code) is shown inside an article but not inside a block.

Started by ianus, April 15, 2009, 05:27:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ianus

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.

DarkAngel612

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

ianus

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...

DarkAngel612

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?

ianus

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.

DarkAngel612

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.