Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 119

mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
01/06/14 10:58 AM (10 years ago)

BT30 - Day 04 - Mod the HTML / Text Plugin

BT30 is my personal project to contribute to buzztouch: https://www.buzztouch.com/forum/thread.php?fid=2348BA49BA5737C92E3D9B5&tid=2348BA49BA5737C92E3D9B5 Day 04 - adding a slight modification to the HTML / Text Plugin Description: So I've had some issues in the past linking to other HTML screens via the HTML / Text plugin. See to do that you require a fancy plugin or fancy code to be able to make a HTML link trigger a native screen in your app. Instead, this can allow you to link to other HTML screens in your app without modifying any core code in your app or without using any special plugin. A screenshot: http://s21.postimg.org/a9lag8vjb/unnamed.png ------------------------------------------------------ INSTRUCTIONS FOR 2.x PLUGIN (3.x in next post) ------------------------------------------------------ IN INDEX FILE OF CUSTOM HTML PLUGIN: <div style='margin:10px;'> <b>The URL to this HTML screen/page is:</b> <div style='padding-top:5px;'> <?php echo '<a href="'; echo $dataURL = $objApp->fnGetAppDataURL($appGuid) . "/documents/customHTML_" . $BT_itemId . ".html";; echo '" target="_blank">'; echo $dataURL = $objApp->fnGetAppDataURL($appGuid) . "/documents/customHTML_" . $BT_itemId . ".html";; echo '</a>'; ?> </div> <div style='padding-top:5px;'> This link can be useful for when you're trying to link from one Custom HTML / Text screen to another. </div> </div> <br> Now that the modification is in place, you simply go to the html / text screen you want to link to, copy the link, and then go to any other custom / html screen and link directly to it. Or you can give the link to other clients who want to see what the html screen will look like live if they do not have access to the app, etc etc. Hope this is useful for some. Cheers, David
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
01/06/14 11:09 AM (10 years ago)
SORRY EDIT: Plugins don't have the index.php file anymore. I've added new instructions (3.x) below: ----------------------------------------------- STEP 1. EDIT config_cp.txt to look like this: ----------------------------------------------- {"propertySections":[ {"fileType":"bt_section", "fileName":"btSection_navBar.html"}, {"fileType":"custom", "fileName":"btSection_link.html"}, {"fileType":"bt_section", "fileName":"btSection_login.html"}, {"fileType":"bt_section", "fileName":"btSection_backgroundColor.html"}, {"fileType":"bt_section", "fileName":"btSection_backgroundImage.html"}, {"fileType":"bt_section", "fileName":"btSection_search.html"}, {"fileType":"bt_section", "fileName":"btSection_tabBar.html"}, {"fileType":"bt_section", "fileName":"btSection_screenJson.html"} ] } -------------------------------------------------------------------- STEP 2: TAKE THIS CODE AND CREATE A FILE NAMED btSection_link.html -------------------------------------------------------------------- http://pastebin.com/J8t5jzhk ---------------------------------------- STEP 3: THEN PLACE THE FILE INTO YOUR CUSTOM HTML / TEXT PLUGIN DIRECTORY: bt_screen_customHTML. ---------------------------------------- http://s21.postimg.org/usuf9wujr/example.png Thank you, sorry about that! David
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
01/06/14 12:19 PM (10 years ago)
Thanks for the contribution.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
01/06/14 09:38 PM (10 years ago)
No problem, too bad this one I thought would be more popular, it's been super useful to me :-) Cheers, David.
 
Mario @ Buzztouch
buzztouch Evangelist
Profile
Posts: 42
Reg: Nov 25, 2011
Frankfurt
10,920
like
01/06/14 11:29 PM (10 years ago)
Hi David! This is really useful. Thx for sharing. Cheers Mario
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
01/30/14 03:37 PM (10 years ago)
No problem Mario! Hope you had a safe trip home!
 

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.