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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 78
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 70
  • Total: 70

Combo box question

Started by fugi, September 18, 2005, 09:56:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fugi

How do I add a CB containing links which I will define?
Is there such a feauture?
Thnx in advance

IchBin

CB = center block?

If that's what you're talking about just go into the "edit blocks" section of the TPadmin. Add a center block and just put in the code for the links in the center block.

fugi

#2
CB as the title says is the Combo Box.
Is that the same with combo box? If so, what's for the extra code.
I thought it was only the links what I should add

EDIT: OK, I saw what u meant with center block, I wasn't talking abt that


Moocat

for a link its
<a href="http://typeurlhere.com">Click here</a>

to make a link. change click here to the link text, and obviously, type the url where it says typurlhere.
i hope thats what you're asking and that you mean javascript/html block when you ask about combo blocks.

fugi

Thnx for the reply but that's not what I'm asking.
I already know how to add links in a block :8

When I say cb I mean drop down menu, like the one in the selection drop down menu in box "Themes".

Moocat

ohhh.
so you want a drop down menu with links? and when you select one and hit ok it takes you there?

Moocat

#6
try this

<form name="links">
<select name="menu" onChange="window.open(document.links.menu.options[document.links.menu.selectedIndex].value);">
<option value=''>Please choose</option>
<option value="http://www.red.com">A red page</option>
<option value="http://www.whatever.com">Whatever.com</option>
<option value="http://www.blahblah.com">Blach Blah.com</option>
<option value="http://www.tinyportal.co.uk">Tinyportal</option>
</select>
</form>

i don't think it will work in a plain HTML box, so make it a html/js block.
i assume that is what you are looking for... lol :)

fugi

Yes! Just what I was looking for!
U r the best cat ;)

Moocat


iowamf

Nifty code - thanks for the example.

For some reason - I can't get this to work on TinyPortal v.0.7.2b_180805 ?

Any chance of getting the referenced URL to open up in the center of the portal versus a new window? 

Thanks & Regards

Moocat

are you sure you're using the right kind of block? make sure its javascript/html.

i don't think that (page in the center) can be done, because this isn't made using frames, but i could be wrong, and someone will post in 5 minutes with exactly how to do it. anyway, i've never seen it done before :P

iowamf

yep - its a block of javascript/html type.

The scroll bars work - but the action to jump to an external web-site doesn't work.

I hope you are right that somebody will post how to embed this into the portal rather than leaving the website.

Thanks

IchBin

IMO I think getting it to load in the center of the portal is not going to work unless you're able to setup your page with some type of frames. Especially if you're loading external websites. You could make it load the external site in a new window if you'd like. Here's a little example of how to do that. I know that's not what you're looking for, but I don't think it's "easily" possible for someone to make it load in TP. Just my $.02

http://www.mountaindragon.com/html/redirectjs1.htm

bloc

No, its not easy to "merge" another page into TP by simply giving a link. youc an of course set up a <iframe> in a article and go from there..but its not the same. Although..I have made articles capable of using php now, meaning you could "include" a page at least. Maybe that could be it?

iowamf

Greetings -

I've got the iframe working in articles to both local files & external sites - but I'm seeing some strangeness (hey, beta SMF & beta TP - it's expected) with articles disappearing if the code is the first part of the article.

I've got a work around by putting some brief text in the article and then the code ... note the "hello" and the "root1's blog" text:

<br>hello<iframe src="../inc/centerbloc.php" height="800" width="100%"></iframe>

<br>root1's blog<iframe src="http://fuchsmail.com/?q=blog/" height="1000" width="100%"></iframe>

sometimes I can get this to repeat if I enter the text in ASCII mode and hit "toggle view" in the editor.

It could easily be because my php/html skills are so bad I enter invalid code a lot ;-)

BTW, I'm trying the php include instead of the iframe - and can't get it to work.

<?php
include("../inc/centerbloc.html");
?>


can you use includes to pull in external web sites as well?

A quick stab at the syntax would be most appreciated.

Regards -


bloc

No, any php stuff will not work in articles. But next release of TP will have the option of php enabled articles.

iowamf

great - that explains it ...

I know this is off-topic, but could you *BRIEFLY*, in all your copious spare time, touch on how the usage of PHP vs HTML in the articles could impact the server & client in your tPortal implementation?

I'm especially interested in the potential differences between HTML iframes and PHP includes with respect to this thread.

Thanks & Regards -

iowamf

#17
oK
and the issue of articles disappearing with some text in front of them -
is that due to bad syntax?

bloc

Quote from: iowamf on September 28, 2005, 03:10:13 AM
oK
and the issue of articles disappearing with some text in front of them -
is that due to bad syntax?

I suspect that is something with the WYSIWYG editor...so it would be good if you checked if the same occur when you turn off the WYSIWYG editor alltogether. Just working with pure html code.

As for impact on the server...any extra calls/scripts you place in iframes etc..affects performance. But frames is essentially a separate request - meaning server just serves 2 pages to the same recipient simultanously. When you inlude files, it means loading it = extra load. I am no expert on this, but try to use require_once or include_once as much as possible, to avoid too much fetching.

other than that, its best to keep it simple , use targetted small scripts rather than big slow ones, and keep in mind that not all things needs be loaded - if they are not used right there and then.

iowamf

Quote from: Bloc on September 28, 2005, 09:50:55 AM
I suspect that is something with the WYSIWYG editor...so it would be good if you checked if the same occur when you turn off the WYSIWYG editor alltogether. Just working with pure html code.
Bingo - that worked ... there is a difference between:

  • turning WYSIWYG "off" in TPADMIN and
  • using the "Toggle View" to turn WYSIWYG "off"
when an article is pure HTML code (or at least begins with HTML code).


bloc

Yeah..the AplosRTE is def. out..but unfortunately the replacement I have now - TinyMCE (no, its not from me ;D ) doesn't have any decent lightweight imagebrowser. So still pondering around that, might have to construct one myself in javascript/php. ugh.

IchBin

You crack me up Bloc. I wish I knew PHP that good. I like the mentality of, "Hell, if it doesn't work, just make one yourself!"  haha!!

Moocat

rofl
if it were me, i'd make it possible to upload your own wysiwyg editor (i'm not sure how hard that is, but i know there's an AplosRTE folder, maybe replacing that you could install a new editor?), so forum admins can choose to use the default or one of their choice.
Personally, i wouldn't mide TinyMCE, because i'm not worried about a lightweight image browser, i really just want a wysiwyg editor that actually works ;D

iowamf

I really don't care what it is - as long as I can turn it off and go into caveman mode like you have working.

I'm sure prioritization is a daily challenge for you and I wouldn't put a better editor even on the radar screen right now  - being able to use the latest release from SMF is my personal #1.

After learning more about this system - "articles" are more like "static web pages" IMHO.  Especially since they are linked to nav buttons via categories. If anything, I'd find an admin-friendly web-editor over a user-friendly WYSIWG. Perhaps when you've had some time to work on article permissions - then a more "user-friendly" editor would be an issue.

WYSIWG is a relative term - an admin wants that *^$#'n thing turned off so they know what they see is what they got.

Thanks

Moocat

yeah i let most of my users submit articles, and most of them are html dummies (don't know the first thing about it) so turning off the editor wouldn't be an option on my site :P

bloc

I am working on it..but other things first, yes.

iowamf

I acknowledge Moocat's dilemma - I thought about that when I turned the WYSIWG off.

Fortunately, I'm still in hack-mode.

Moocat - do you have to aprove & categorize all article submissions before they show up to end users?

If so, I  understand that's easier than having to produce every page on your site yourself.

In the future, I see the value of "articles" as an option the web-master would have to turn over authority to certain individuals or groups thru links which would get the WebMaster out of the Critical Path between article creation and article posting.

Regards

Moocat

yeah i do all the approvals and categorization after they submit. i just have them send a pm to what category they want it to be in and then i just put it in a random category :P

bloc

one problem as I see, is the potential misuse on uploading pictures. Thats why i am looking for a good imagebroswer/uploader to go with the editor.

But there is also FCKEditor, and even SPAW which looks good. I tried them but TinyMCE just had the quickest response.

This website is proudly hosted on Crocweb Cloud Website Hosting.