Discussion Forums  >  Self Hosted Control Panels

Replies: 8    Views: 104

XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
08/13/12 11:29 AM (13 years ago)

HTML/plain text plugin not working

On my self hosted control panel, I add some text to the plain text an HTML plugin, I set the text size to 36 and click save, then when I refresh the page, it shrinks the text down to the size of the default one and when I look at it in Xcode simulator, I can't read anything (size is too small to see) Any one else experienced this before? Or know a solution? Thanks, Raoul
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 02:33 PM (13 years ago)
What does the HTML being saved look like? When the editor is used to manipulate font size, color, bold, italic, etc. it's just changing the HTML markup in the editor itself. You can see this markup using the appropriate button on the editor. When you press save, the entries are saved to a simple text file with a .html extension (an html file with the screen id appended to it) on your web server. These files are saved in the /files/applications/[app id]/documents directory. Look at the file that's being saved, is it valid HTML? Do the "font choices" appear in the HTML?
 
XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
like
08/13/12 02:36 PM (13 years ago)
When I click source, it shows the HTML code, I see it says 36, but when I check in my app, I re compile and run again, it is same size font(small size), then when I refresh the web page, the size of text goes back to the small size(default) Sorry if this sounds confusing. Looking forward to your reply.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 03:14 PM (13 years ago)
What are you asking.... "the control panel doesn't work, it's not saving my entries" OR "the app isn't showing the right HTML" Big difference. It sounds to me like you're loading a cached version of the HTML and the "newest changes" are not being displayed on the device. If this is the case, look at the HTML the UIWebView is loading on the device. Is it marked up (with the font size you expect) like you want?
 
XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
like
08/13/12 03:27 PM (13 years ago)
The app isn't showing the correct HTML, that's my issue, do I navigate to /files/applications/[app id]/documents directory like you said before and see the HTML there and see if its different? or is there another way to approach this?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 03:29 PM (13 years ago)
I would use the Output Console in Xcode to "see" what HTML is being loaded. Do an NSLog statement or something. Or, you could just use the console to show you the URL that the HTML is loading from. Copy it, put it in your browser, what do you get? It's a matter of figuring out WHERE the html is coming from (cached, a url, etc) then having a look at it to see if it's what you expect.
 
XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
like
08/13/12 03:36 PM (13 years ago)
this is what I did: Navigated to /files/applications/[app id]/documents directory. I replaced app id with the application id. Then I say png image files and 2 custom HTML files, I opened these HTML files and they are displaying the same text size, Is there a possibility that it is not overwriting after I click save?
 
XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
like
08/13/12 03:43 PM (13 years ago)
This is the size when I change it to 36: http://gyazo.com/301ffe780e229cb4108bfa5f659708f9 I click SAVE and then refresh the page, and this is what happens: http://gyazo.com/abbda0641f78fa7696fe8b4cdb4ecb4b Size shrinks down. Hope this makes more sense. Looking forward to a fix, thank you.
 
XboxMods
buzztouch Evangelist
Profile
Posts: 718
Reg: Oct 28, 2011
location unknow...
12,080
like
08/14/12 12:57 PM (13 years ago)
I found the URL it was pulling the HTML data from, I navigated to the HTML file and I edited the HTML code, it works now. Thank you.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.