Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post Bbcode Web Tags? 
 
Could anybody please tell me how to ad a web tag to the bbcode list so I can post web pages within a post.
On my other portal system that I want to convert to Icy I have the feature which includes the below tags, but obviously doesn't work on Icy as its not included  
Code: [Download] [Hide] [Select]
Insert web page: [web height=#]Page URL[/web]


Cheers
Karl
 



 
batmanSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
There's something in the docs about how to add bbcode tags etc - might not be anything specific to what you actually want to do? But I do know one thing, and that's Icy Phoenix doesn't use the standard phpBB bbcode script.

I've looked at how the Icy bbcode is applied - if you get stuck - yell out, and I may be able to help!  

Edit:

Thinking about this after a couple of beers!

[web height=#]Page URL[/web] ?

Page Url would have to equate to <iframe src="Page URL" width X height etc, with the no-scrolling attribute applied or something very similar.?

Because I can't see how else one could import a url and open it in the text area - Unless I'm missing something?

And from what I've read here - Icy Phoenix has no provision to allow <iframes. - In fact it appears they are dead set against it and don't cater or allow for it.

Could be wrong - But that's how I read it!  
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
The feature is used on integramod 2.
I was going to stick with them as have done since 06 i wanted to upgrade but integramod 3 has been in Beta for so long now and the actual download is deactivated due to upgrading or something, Ive been weighting about 2 years to up grade so had to make a decision and now here, its a shame as helter skelter on there works seriously hard and been a great help over the years    

The web tags are a really useful tool as it means members don't navigate away from your site, ill have a nosy see what I can find..

Thanks for your input  

Below is a pic of how it looks when you post a web page, if its not possible Ill seriously miss this feature as we use it a lot..

 18_02_2011_16_57_58
 



 
batmanSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
actualy, the new long awaited Icy version( svn at the moment), includes an personalized BBcode option.

something  like PhpBB
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
@batman.

It does look useful!  

Stand by because I think I can run something to test if this is going to work with Icy Phoenix?






I think!
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Look forward to it cheers  
 



 
batmanSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Took 20 minutes - -  

BINGO!

Have a play with this using the [flash] tags, see what you can come up with as the best optimal sizes etc, then it can be written up with its own bbcode script.

Find in includes/bbcode.php

Code: [Download] [Hide] [Select]
Find:

                if (($tag === 'flash') || ($tag === 'swf'))
                {
                    $html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' . $width . '" height="' . $height . '"><param name="movie" value="' . $content . '"><param name="quality" value="high"><param name="scale" value="noborder"><param name="wmode" value="transparent"><param name="bgcolor" value="#000000"><embed src="' . $content . '" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" width="' . $width . '" height="' . $height . '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';
                

Replace with:

                if (($tag === 'flash') || ($tag === 'swf'))
                {
                    $html = '<iframe src="' . $content . '" width="800" height="600" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe>';



A couple of links that will help.

CUSTOMIZATION - Adding Video BBCode And Buttons To The Editor.

http://www.icyphoenix.com/viewtopic.php?p=44061#p44061


Though this one advocates NO IFRAMES - It appears it's directed at adding script in iframes to the text area, rather than just linking.  

BBCODE - CUSTOMIZATION - DANGEROUS - How To Allow IFRAME And Full HTML Parsing

http://www.icyphoenix.com/viewtopic.php?p=17045#p17045


Demo Pic.

bingo1.png
Description:  
Filesize: 72.33 KB
Viewed: 87 Time(s)

bingo1.png


 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Cheers ill have a nosy at that tomorrow  
 



 
batmanSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Hehehe!

I'm not doing much at the moment, so I'll probably have it written up by the time you get to it.

Will let you know.  
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Instead of modifying the flash bbcode (which may lead to errors while using the TRUE flash tag for real flash content), why not simply add a new bbcode or upgrade your version in order to use the " custom bbcodes " available ?
 



 
YrosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Yros wrote: [View Post]
Instead of modifying the flash bbcode (which may lead to errors while using the TRUE flash tag for real flash content), why not simply add a new bbcode or upgrade your version in order to use the " custom bbcodes " available ?


Yros,

It wasn't intended to modify the Flash Code, it was ONLY used as an example to see if Icy Phoenix would parse <iframes.

I've asked MG for some help because I'm having trouble parsing any changes I make to pop-up prompts by way of width and height.

It doesn't matter how I add the variables or change the arrays in bbcode.php - They parse into the post, but I cannot get the changes to parse into the db with the string changes.

And I've just realised that I was ONLY Previewing them - Damn, maybe that's the problem!

Anyway - I'm open to any suggestions if anyone wants to add the extra code here while I'm trying to sort out bbcode.php.

This all works - But it's hard-code for height and width - That's what needs fixing!  

Spoiler: [ Show ]


Edit 1:

Well It's working in a fashion as I can adjust the width but not the height. Time to give it a break for a while I think.  

But don't let that stop anyone who knows more than I do (Which is not much) from helping with this.

Edit 2:

This is the problem - [web width=450 height=450]http://www.gifbin.com[/web]

If I change either value above 450, the whole thing stuffs up - What's holding it down and where it is - I have not got a clue at this moment.

 

Edit 3:

This appears to be the maximum....

Anyone happy with that?     

[web width=600 height=450]http://www.gifbin.com[/web]


But if I hard-code it with this - width="800" height="600" - That's what you get! Though 700x700 fits better.
 



 
Last edited by mort on Sat 19 Feb, 2011 09:11; edited 1 time in total 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Hi all,
Honestly I would not add such a BBCode unless in some way restricted to administrators or people you are trusting blindly.

The reason is that you can add almost anythin in an IFRAME even evil scripts which could harm your visitors... I wouldn't risk that honestly.

In dev version of Icy Phoenix it should be easier get what you need because I have coded (I hope properly, but not fully tested so far) an option to allow HTML to administrators... anyway, you are asking something for the old version.

Before going on in helping you I would like you to confirm that you are aware of the risks you are going to face...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Hi MG,

I could always add the code to it <!-- IF S_ADMIN This <iframes code -  <!-- Else Nothing etc or maybe echo ADMIN ONLY TAGS! etc, etc.

 

Maybe add S_ADMIN_MOD too


All in php of course - not constants.

Edit:

I think that this should do it:

Code: [Download] [Hide] [Select]
            elseif ($tag === 'web' && (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD)))
                {
                    $html = '<iframe src="' . $content . '" width="' . $width . '" height="' . $height . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe>';
                }


I also think I'll settle on this as the maximum because it's adjustable and it should be big enough!

[web width=600 height=450]http://www.mysite.com[/web]
 



 
Last edited by mort on Sat 19 Feb, 2011 09:41; edited 1 time in total 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Unfortunately it would not be that easy... I know it's tricky, I've dealt with it in the past.

You know what will be the result of your code? Everyone could insert IFRAMES but only admins will get thet when they visit the topic... and it is not what we wants.

We need to check the permission when adding the BBCode to DB and then display to all users... we just need to check that who added the content had the right permission for doing that.

Anyway, the topic you linked "BBCODE - CUSTOMIZATION - DANGEROUS - How To Allow IFRAME And Full HTML Parsing" should do the job properly (you can call it WEB if you don't like IFRAME, but the result is the same).

If you now just need help with the JS to add also Width and Height parameters, I'll have a look and report back.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Bbcode Web Tags? 
 
Don't know MG?

As an unauthorised logged-in person trying to hack the web tags.

If I quote Admin.

Admin wrote: [View Post]
[web width=600 height=450]http://www.mysite.com[/web]


And strip the quote as well.

[web width=600 height=450]http://www.mysite.com[/web]


All I get in the post is.

     Admin wrote: [View Post]
     http://www.mysite.com

http://www.mysite.com

If I change the quoted url to:

[web width=600 height=450]http://www.hotscripts.com/category/cgi-perl/scripts-programs/[/web]


All I get in the post is.

    Admin wrote: [View Post]
    http://www.hotscripts.com/category/cgi-perl/scripts-programs/


If I click the [web button as a user (Which can be hidden anyway with <!-- IF S_blah blah in the .tpl file.) and try to add the [web tags

All I get in return for the post is.

http://www.hotscripts.com/category/cgi-perl/scripts-programs/

So I can't see how it's going to parse the <iframe html into the code tags when I'm anything other than an ADMIN or MOD.

MG wrote: 
You know what will be the result of your code? Everyone could insert IFRAMES but only admins will get thet when they visit the topic... and it is not what we wants.


I tried that too with the user both adding tags and quoting Admin.

When the "User" posts or quotes the [web tags, they are invalid because he or she can't call the $html to add the <iframes whether it's quoted or not?

Am I missing something?

Oh oh - Unless it's because I'm using 127.0.0.1 and being denied - but I have no way to test that live!  
 



 
mortSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron