Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 46

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
01/18/14 07:45 AM (11 years ago)

PDF Plugin- One Screen launched with one of many PDFs

Will have a number of screens each dedicated to a different event. (starting with 5, but could be 100). Each event screen would need to launch a PDF plugin screen with a PDF based upon the event I am looking at (screenNickname). The goal is not to have 5-100 unique PDF screens ;) Currently hosted by BT, v3 The PDF files would be stored at a URL (BT file manager initially) Initial solution could be If Then Else, but would rather have JSON so after App released it would be easy to update for user without going back to App store due to code change. Probably has been discussed many times, but couldn't find right post. Just getting up to speed on the coding side. Thanks.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/14 07:52 AM (11 years ago)
Look at loadScreenObject
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/18/14 08:57 AM (11 years ago)
Thanks Chris- loadScreenObject looks powerful. I found about five threads that had loadScreenObject in their discussions. However I guess that is on hold until I learn php and mysql... For proof of concept I can use the five individual events/pdf screens, and later I will need to update in order to expand. Is there a section-document somewhere on the site that I am missing similar to (older) v1.5 docs http://www.buzztouch.com/docs/v1.5/screen_pdf.php that has info on loadScreenObject, etc.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/14 09:01 AM (11 years ago)
Not at the moment. But I'm pretty sure I know which threads you read and there doesn't get much better than that
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/18/14 09:32 AM (11 years ago)
The core 'concept' of loadScreenObject can be summarized as this: a single json compliant 'line' that contains all of the Json required to 'populate' the next screen. So, if your desire is to dynamically load a BT_screen_pdf "screen", then your 'loadScreenObject' line in your 'event menu item' would contain the itemId, itemType, itemNickname, and all of the json needed to properly display the screen, as well as the 'dataURL' needed to load the desired pdf file (or, the correct filename from which to pull from the bundle, depending on your project design). All on one line (all in one object, if you want to get technical). If you get stuck, just give a shout on the forums, and someone will come along. I can't remember what I did yesterday, so forgive me if I've done this before. But If you have access to a LAMP/WAMP or some kind of server with PHP/MySQL, I created a little 'loadScreenObject kit' that shows the basics of how loadScreenObject can work. Once you have the basic principles down, it tends to get easier. https://dl.dropboxusercontent.com/u/115208762/loadScreenObject.zip Just remember, it really doesn't matter what kind of screen you're loading; the principle remains the same: "Put all the info in that one line object". don't worry if it seems like it's a mile long; that's just the way things are. I found out the hard way that inducing invisible characters by making the code look "pretty" will just cause much anguish and knashing of teeth. Cheers! -- Smug
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/19/14 02:32 PM (11 years ago)
Thanks for the detailed advice Smug.
 

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.