Discussion Forums  >  Images, Documents, File Locations

Replies: 26    Views: 146

chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
04/08/12 05:50 PM (13 years ago)

Custom HTML / Text screen formatting and '

When I paste a word doc or plain text or copied text from a web document into the plain text window on BT Server 2.0, I get a backslash in front of the colons and semi colons. ie: " or '. These are not present in the source text or the plain text screen when going back and looking, only on the android device. One thing that worked on one of the screens was copying from a pdf and pasting into the plain text screen, when doing this I have no problem. BUT the source looks the same either way when comparing. Any idea's?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/08/12 08:07 PM (13 years ago)
Hi @chrspe, It's best to not copy and paste text from anything that might format the text before...like from Word or even possibly an HTML site. The best thing to do is copy your text, paste into a simple text editor like Notepad (which does no formatting), and then copy/paste into the text window on BT Server. That way you're sure to have removed any pre-existing formatting. Mark
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/08/12 08:19 PM (13 years ago)
Does it when I use notepad too. Just tried it again.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/08/12 08:21 PM (13 years ago)
Weird. Is this for iOS or Android or both? I'll try to repro later tonight and see if I can get to the bottom of it. If you can send me a file with sample text that you know is broke, I can use that for consistency. MrkFleming at gmail dot com. Mark
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/08/12 08:23 PM (13 years ago)
Android.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/08/12 08:28 PM (13 years ago)
Cool. I'll try and repro tonight. Send me some problem text if you can. I'll have to use an emulator, though...no Android device unfortunately! Mark
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/08/12 08:33 PM (13 years ago)
Just noticed when you past that notepad file in, it really jumbles the formatting. For some reason the pasted pdf keeps everything nice.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/08/12 08:49 PM (13 years ago)
Well, Notepad text has no formatting at all. You would need to add the appropriate HTML formatting to make it look all pretty like you probably want. Notepad text is straight up text...no bold, font sizes, etc. Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/09/12 12:42 PM (13 years ago)
Been having the same problem with backslashes. Did a bit of digging and it turns out that my server has magic quotes turned on. Switched them off and no backslashes! Magic quotes settings are in the php.ini file in the server root (the root of the host server, NOT the root of the BT server). Some shared servers might need the settings to be changed by support.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/09/12 12:44 PM (13 years ago)
Dang, that sounds like the solution right there! Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/09/12 12:50 PM (13 years ago)
2 days I've been messing around with custom html. That's one problem fixed! *The server/ckeditor just isn't doing it's job properly. Another problem is saving the html and the html file is empty, so on the device it just shows a blank screen. I think this is another reported problem. *Edit.. It's probably not doing it's job properly because of my server set up, not the fault of BT. :) Thought I'd better clarify..
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/09/12 05:16 PM (13 years ago)
I just wrote Godaddy to see if they could turn it off, it listed magic_quotes_gpc as on when I ran the php utility from the server. We shall see what happens. @raveyd- I read a while back that if you save your text or html in the Custom html screen THEN go and make changes on the same page to the settings and save, that it whipes out the html code. Always make changes to the settings and save first, then enter html or text and save 2nd. Has been working well for me.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/09/12 06:11 PM (13 years ago)
The magic quotes fixed mine, good luck! You're right about how the blank screen appears. I found that issue as well, on the ckeditor forum. It's the php.ini file again, increasing the max memory size settings fixed that. I just doubled them so it'd be easy to remember if it sent everything skoogy. Over the last couple of days, I've found that ckeditor appears to be very finicky, the littlest thing can throw it, for example, non-utf-8 characters - a common miss is double quotes, and also erroneous html code, for example, missing a closing <p> tag.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/09/12 07:25 PM (13 years ago)
nice to know that backend is ckeditor. i thought i recognized that toolbar/look from using mailchimp. no so wysiwyg is it.... but this drives me nuts when BT server 2.0 monkeys with the code i paste in the custom HTML screen. that source button. grrr.... i was thinking recently...that the file i'm generating there must just reside on the server in a folder when i'm done with it. if it's just plain html.... ...can i just upload my own html and overwrite it so i don't have to use that editor? or will that mix up the server?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/09/12 08:06 PM (13 years ago)
Look in the config file, the url of the document will be in there. Something like: files/applications/key_number/documents/
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/10/12 06:34 AM (13 years ago)
Success! GoDaddy said I had to make the change in my php.ini myself. The ini file in my root only has about 10 entries, php must use a standard ini file and then mine is an exception to that. Works great. Also I increased the memory limit from 32M to 64M and it really seems faster, did you notice this? I am now able to paste OpenDocument Text files in with no problem, all formatted the way I want. Are there any other php tweaks anyone has noticed? Thanks raveyd and gonorthwest!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/10/12 07:46 AM (13 years ago)
Great news! You could also try increasing these if you have them in the php.ini file, it'll give the server more time for processing: max_execution_time = 30 max_input_time = 60 remember the original settings, just in case you have to revert back!
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
04/17/12 11:25 AM (13 years ago)
Raveyd- I have a couple javascripts that work fine in the native android browser, but not in the custom html or the html doc. Have you ran into the ckeditor adding things? One was in a test area was just a command that said disabled. When saved, it changes to disabled="disabled".
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/11/12 02:11 PM (13 years ago)
chrspe - I have the same problem and I am with GoDaddy. Could you tell me how to make the change to the php.ini file that you made, please? I'm non-techie so some extra help would be appreciated - I've tried hunting around the net for help but without success. John
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
07/11/12 09:33 PM (13 years ago)
Log into godaddy account, go to web hosting then click launch. Click on FTP file manager. Click the check box next to php5.ini, then click edit on the top toolbar. My php5.ini looks like this: date.timezone=GMT magic_quotes_gpc=Off memory_limit=64M 3 lines/thats it, make changes and click the little blue disk to save.
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
07/11/12 09:34 PM (13 years ago)
This is what the php.ini file looks like, follow same as above to make any changes. register_globals = off allow_url_fopen = off magic_quotes_gpc=Off memory_limit=64M expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support ;[Zend] ;zend_optimizer.optimization_level=15 ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 ;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so ; -- Be very careful to not to disable a function which might be needed! ; -- Uncomment the following lines to increase the security of your PHP site. ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru, ; phpinfo, exec, system, dl, fsockopen, set_time_limit, ; popen, proc_open, proc_nice,shell_exec,show_source,symlink"
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/12/12 01:48 AM (13 years ago)
Hi chrspe, Thank you for leaving me such detailed information. Much appreciated. I've carefully followed the steps. I only have a php.ini file not a php5.ini so I added magic_quotes_gpc=Off memory_limit=64M to it as this was missing. The rest of the file is exactly as the php.ini file shown above. I have entered new information to my custom html screen but I am still experiencing the same problems of getting backslashes. How do I know that I've correctly amended the php.ini file? What else can I do to fix this problem? Many thanks, John. PS - A quick update: I just pasted some html into my custom html screen (I use BT 2.0 on my own server) and I noticed this error message pop up beneath the screen: Oops, a PHP error was trapped. File: Unknown Line: 0 Message: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater Does this help give a clue as to the problem and cure? Further update: I carried out an update to Buzztouch 2.1.7 and these errors were solved.
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
07/12/12 06:36 AM (13 years ago)
I had forgot that I did this, you have to create the php5.ini file, it's related to Godaddy. So just open up notepad, paste in: date.timezone=GMT magic_quotes_gpc=Off memory_limit=64M Save As- php5.ini Login to Godaddy and get to your file manager, upload php5.ini. Then put your php.ini back to where it was. Save and you should be good.
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/13/12 02:38 AM (13 years ago)
Hi chrspe, Again, many thanks for your time. I have carried out the instructions you gave and the problem is resolved. I am most grateful. Kind regards, John
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/27/12 09:35 AM (13 years ago)
Now I have a new problem - spaces are deleted between words randomly throughout the document when I use the custom html or html screens. Has anyone got a cure for this, please? John.
 
chrspe
Android Fan
Profile
Posts: 95
Reg: Jan 07, 2012
Buffalo, WY
5,400
like
07/28/12 09:20 AM (13 years ago)
Are you missing a single space or multiple spaces? If you are trying to get 4 spaces, html will revert to only one in some cases. If this happens, you need to go into the html mode and ad &nbsp; for as many times as you want a space. Four times would be &nbsp;&nbsp;&nbsp;&nbsp;
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/28/12 11:48 AM (13 years ago)
Thanks, chrspe. I am losing single spaces randomly with some words are being combined. Likethis. The html is being copied from a simple html editor and pasted into the source form on the plugins. The html still looks OK when I check it after I've saved it and updated the app. Any ideas? John
 

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.