Discussion Forums  >  Self Hosted Control Panels

Replies: 12    Views: 113

leon7000
Lost but trying
Profile
Posts: 58
Reg: Mar 02, 2012
Saudi Arabia
6,080
04/22/12 06:48 PM (13 years ago)

Asking:about instructions.pdf

Hi all BuzzTouch Users & Owner I Want ask about some files that downloaded with Source code Like instructions.pdf and README.txt I am very close to the completion of the translation of my BT server my question is:how can i add my own instructions.pdf and README.txt that i will write it in my language or translate it from the English one Thank You And i hope you have a nice day
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/22/12 07:40 PM (13 years ago)
Write it and add to source code, but why do that. Hopefully not one will open up the app and poke around. Add content to the app via the control panel for users to see.. Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/22/12 09:15 PM (13 years ago)
Hi @leon7000, Those instruction documents really don't get compiled into your app, and would never be seen by your end users. If you have some instructions or readme's that you want users to view, then you should create those documents and link them to a screen in your app somehow. You could do them as PDF, HTML, Word...whatever you want. They would go in BT_Docs if you want to package them with the app. Make sense? Mark
 
leon7000
Lost but trying
Profile
Posts: 58
Reg: Mar 02, 2012
Saudi Arabia
6,080
like
04/22/12 10:46 PM (13 years ago)
Hi Fred ,Hi Mark i have BT server that will have users from Foreign language here when you create an app and download the source code you find an instructions.pdf in English inside the zip project ..i asking about how can i replace it with my own instructions.pdf with my language ...To be added automatically when my bt server user download the source code . Thanks
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/22/12 11:09 PM (13 years ago)
Well, now that's a darn good question! I looked in every folder on my BT Server install, and could not find the instructions.pdf file. So, let's hope the BT crew sees this and answers! Mark
 
leon7000
Lost but trying
Profile
Posts: 58
Reg: Mar 02, 2012
Saudi Arabia
6,080
like
04/23/12 07:31 AM (13 years ago)
Thanks Mark .. i thing it's generated when download request .. i search inside alot of file trying to find the code for it and i hope BT crew can help us .
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/23/12 09:36 AM (13 years ago)
This is a great question and raises some interesting ideas. Both of you are correct, the instructions.pdf file (and a few other files such as the README.txt file) are NOT hosted on your control panel and do come from our API. This means you'll be unable to change this default behavior automatically in a control panel. However... I can think of a few different ways to accomplish this, none of them trivial. I think the easiest way would be to overwrite these files using some PHP code AFTER the package is downloaded from the API but before the package is .zipped up for the user. Understanding the steps in the process may make this easier to conceptualize. a) User click "package source code" b) Self hosted panel contacts API c) API returns a project package (containing the instructions.pdf) this is a .zip archive d) Self hosted panel unzips the archive for processing e) Self hosted panel adds plugins and other assets and makes some adjustments to the package f) Self hosted panel creates a .zip archive in the /files/temp folder for the user to download. This means that I would add an additional step before f). "Delete the instructions.pdf from the package and replace with "this file on my server" before creating the .zip archive." Explaining how to do this is a bit beyond the scope of this forum post but I can try if anyone's interested in working this. ALL the logic (new PHP) will be done in one file, the file is located at... BT-server/bt_v15/bt_app/bt_appDownload_AJAX.php You'll want to add your new logic just about the line where it reads "process plugins." You'll need to do this in two places (same logic but a bit different for each platform) once for iOS and once for Android. Same file handles both packages.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/23/12 10:19 AM (13 years ago)
Perhaps overkill but a plugin that you could add to your self-hosted server containing the translated instructions file. It would appear in every project source code alongside the English file. Fred
 
leon7000
Lost but trying
Profile
Posts: 58
Reg: Mar 02, 2012
Saudi Arabia
6,080
like
04/23/12 12:45 PM (13 years ago)
Hi David ,Hi Fred David ..yes i am very interested to do this..i know you are very busy man and hope you have a time for helping us with this . Fred ..yes this is another way but it's will be Unclear for users they can not understand English ...and for easy understanding for my users i would like to but all info and instructions file on the front windows that open after unzip the source code ...i plan to translate every English word on all plugins and on bt server to make it clear for all my users. Thank you
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/23/12 01:57 PM (13 years ago)
Plugin idea: This seems logical but also prolematic. I say this because the idea behind creating a plugin is to create a "new screen type" and not necessarily a way to create a new self hosted panel feature. But, of course we've considered lots of ways to use the plugin approach to extend the backend's functionality as well. I think in this case it will be a matter of... a) FTP'ing the new / modified / translated document to a safe place on the webserver. b) Modifying the packaging code (the file mentioned in the previous post) to include this file in the downloaded package. c) Testing to make sure it works. Next, we can update the control panel package (an update is overdue anyway) to allow an admin to "Include Files in the Downloaded Package" so the functionality can be used by anyone using the package without having to write custom code. Cool feature!!! Longer term..working out all the details associated with uploading "Control Panel Plugins" so folks can extend the functionality of the panel by leveraging other peoples code. @leon7000: Are you able to do the PHP necessary to accomplish this like I described or do you need assistance with this? If you can, it will be much faster to do it on your own. If you cannot, OK, I'll figure it out and email you the uploaded file / instructions.
 
leon7000
Lost but trying
Profile
Posts: 58
Reg: Mar 02, 2012
Saudi Arabia
6,080
like
04/23/12 03:23 PM (13 years ago)
Hi David and thank you for your replay i don't know alot about programing with PHP and i appreciate the help with that i will waiting your email and really thank you for your support .
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/23/12 04:22 PM (13 years ago)
A useful modification would be to show item id in the control panel. @David, there been some discussion regarding item id's. Could you provide any insight about the best method for item ids. Fred
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/23/12 09:28 PM (13 years ago)
Item Id's: All the items in the JSON require a unique id. This id uniqely identifies the item in the JSON and in the database. The method that is used to create these id's is in the /includes/utilityFunctions.php file. It's called fnCreateGuid() The fnCreateGuid() method is used in hundreds of locations throughout the app and returns a unique id. This id is inserted in the guid column in the database. It's OK to re-write this method to return a unique id that is shorter, different, strategic, etc. All it needs to do is create something that is guaranteed to be unique.
 

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.