[PLUGIN] HTML_Div

Post your completed addons to share with the community

Post » Tue Dec 13, 2011 2:51 am

Thread Discontinued - Go Here Instead




Want to display formatted HTML text / links, PHP generated HTML content, youtube videos, facebook like buttons, images, widgets, news listings, comments and much more HTML/PHP stuff into your games and apps? Well with this plugin you can.

You can create an HTML Div with this plugin. By default, it is a blank square that allows you to type HTML formatted text into. Included are the abilities to change the content/innerHTML of the div, and even change the style (for example, you can restrict the size and add scrollbars to your text div box by adding the overflow:auto; style)

Also supported is the ability to load the content with AJAX! You can load text files, the results of PHP files, and more with this feature. This feature only works on web servers (much like the AJAX plugin). You can even pass GET and POST data while requesting content from HTML/PHP pages.

Included in the download is the plugin, example and documentation - but I assure you if you know HTML, this will be a breeze to use (no advanced learning curve).

Download HTML_Div Plugin, Example, Docs

Enjoy!jessejoh2011-12-14 03:01:01
B
14
S
3
G
1
Posts: 25
Reputation: 1,289

Post » Tue Dec 13, 2011 4:15 am

It's very powerful! Thanks.
B
97
S
22
G
178
Posts: 4,119
Reputation: 104,045

Post » Tue Dec 13, 2011 8:58 am

I get an error upon previewing, I think its to do with it not being on a server though right?

I saw something about that on your txt file..
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 13, 2011 11:48 am

Is there a way to load a twitter widget with this --

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 30000,
width: 250,
height: 300,
theme: {
    shell: {
      background: '#333333',
      color: '#ffffff'
    },
    tweets: {
      background: '#000000',
      color: '#ffffff',
      links: '#4aed05'
    }
},
features: {
    scrollbar: false,
    loop: false,
    live: false,
    behavior: 'all'
}
}).render().setUser('GinoRea').start();
</script>
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 13, 2011 3:41 pm

I can't get that code to work. If anyone has any ideas, on how to overcome that, let me know.
B
14
S
3
G
1
Posts: 25
Reputation: 1,289

Post » Tue Dec 13, 2011 3:45 pm

Do you have anyway of retrieving user tweets? -- You would save my life :)
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 13, 2011 5:55 pm

smitchell - ill work on this tonight,

I highly recommend using the iframe for user tweets for now though! Tonight I will add the "style" functionality to the iframe plugin, and then you can just take off the border with CSS style, and use the iframe to show a blank page containing only your user tweets

deal? I'll message you tonight regarding the updated plugin :D

or if you need it now, you can insert an iframe into your HTML_div object's innerHTML and style the border out. For example:


Set HTML_Div innerHTML to
"<iframe src=""tweets.html"" style=""width:100%;height:100%;border-width:0px;""></iframe>"


The problem with what you're describing is that I think there is an interference of the scripts, and I would need to probably talk to Ashley regarding what can be done (as I'm unable to determine what's causing it to not function) about using other scripts on the same document alongside the runtime.jessejoh2011-12-13 18:03:28
B
14
S
3
G
1
Posts: 25
Reputation: 1,289

Post » Tue Dec 13, 2011 6:12 pm

This is exactly what i done! i came on this thread to get the link to your plugin.

Here is my thread

http://www.scirra.com/forum/topic47066_post294781.html#294781
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Thu Mar 29, 2012 2:32 am

when i try to set the innerHTMl from an expression that returns a string after selecting the expression the diaog gives error saying you cant use numbers only strings, BUT the expression IS a string.

can you fix this
B
7
S
1
Posts: 65
Reputation: 821

Post » Thu Mar 29, 2012 11:29 am

@everybody : I need to iron some bugs on those plugin (at the beginning, they aren't mine, I just choose to continue their development). I'm a bit overcharged with work this week, but I'm going to try to fix that next week.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest