Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 19    Views: 138

Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
12/17/13 02:06 PM (11 years ago)

Minor HTML code help please?

Take a look at the "Image XML Element" text box in my control panel page here:.... https://dl.dropboxusercontent.com/u/16323370/Screen1.png Why does it not look like the other text boxes? Here is my code:........ https://dl.dropboxusercontent.com/u/16323370/Screen2.png Thank you in advance.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
12/17/13 03:10 PM (11 years ago)
@Red Dog, I'm not an expert in the control panel area but wouldn't you need to close that last value with a " somewhere later on. At the moment I can see value="code-here-etc-etc but no closing " The weird thing is all of the others are the same. Hope this helps in some way ... Cheers Darrel
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/17/13 03:21 PM (11 years ago)
If you totally remove the "Image XML Element" code altogether, does the symptom 'shift up' to the Link XML Element field? It sort of looks like none of the fields have a closing quote mark (") for the input 'value' after the closing php (?>) Cheers! -- Smug
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/17/13 03:40 PM (11 years ago)
You need to close the quotes on the value attribute eg: value="" Example File: https://dl.dropboxusercontent.com/u/37533602/example.txt
 
bigPaul
Lost but trying
Profile
Posts: 103
Reg: Mar 08, 2013
Darwin
4,530
like
12/17/13 03:45 PM (11 years ago)
As Smug says, You are missing the end quotes for each value variable but also missing the closing '>' for each input field statement. ie each line should finish - ?>"> - Paul
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
12/17/13 04:16 PM (11 years ago)
Thank you everyone. It looks like the best solution was to go with double quotes right after value=: value=""<?php echo fnFormOutput(fnGetJsonProperyValue("xmlItemImageName", $jsonVars));?>
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/17/13 04:29 PM (11 years ago)
Something still doesn't look right. It might work, but something tells me there be monsters waiting. Cheers! -- Smug
 
bigPaul
Lost but trying
Profile
Posts: 103
Reg: Mar 08, 2013
Darwin
4,530
like
12/17/13 04:46 PM (11 years ago)
@RedDog Those double quotes will just fill your value field with a blank! Check this code, it will definitely work! https://www.dropbox.com/s/f46hlj91s5craf9/samplecode.txt https://www.dropbox.com/s/bsv64ufka8mjp0i/Screenshot%202013-12-18%2008.58.35.png Note- I used variables item 1-5 as example to produce display, replace these with your function call. - Paul
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/17/13 06:35 PM (11 years ago)
bigPaul is correct. You need to close your value attribute and close your input attribute. <input type="text" name="json_xmlItemImageName" id="json_xmlItemImageName" value="<?php echo fnFormOutput(fnGetJsonProperyValue("xmlItemImageName", $jsonVars));?>">
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
12/17/13 07:34 PM (11 years ago)
Thanks guys, but adding the "> at the end just produces this ; ........ https://dl.dropboxusercontent.com/u/16323370/Screen3.png
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/17/13 07:49 PM (11 years ago)
@Red Dog, Can you post the full PHP code you are using?
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
12/17/13 07:54 PM (11 years ago)
Sure CakeBit. Maybe I am missing something further up the page ...... https://dl.dropboxusercontent.com/u/16323370/Full.rtf
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/17/13 08:12 PM (11 years ago)
I fixed the file up for you and made sure it is valid PHP/HTML. Let me know how it works :) https://dl.dropboxusercontent.com/u/37533602/example.txt EDIT: Download this file and change it from a .txt file to a .php file before you upload it to your server.
 
bigPaul
Lost but trying
Profile
Posts: 103
Reg: Mar 08, 2013
Darwin
4,530
like
12/17/13 08:50 PM (11 years ago)
@RedDog, I forget to mention earlier that there were also some quote marks missing further up in your code, so if you look at my sample code and compare you should be able to see difference. (in particular missing quote marks in <div style sections) Just adding 1 quote or endpoint here and there in your code is just shifting the problem!
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
12/17/13 10:20 PM (11 years ago)
yup. still printing outside the text box.... https://dl.dropboxusercontent.com/u/16323370/Screen4.png I appreciate all the help, but I think I will go back to my double quotes (value="")
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
12/17/13 10:45 PM (11 years ago)
OK, I found this to work well. I changed all of this: <input type="text" name="json_xmlItemImageName" id="json_xmlItemImageName" value="<?php echo fnFormOutput(fnGetJsonProperyValue("xmlItemImageName", $jsonVars));?> to this: <input type="text" name="json_xmlItemImageName" id="json_xmlItemImageName" value="" /> I think David has moved the "fnFormOutput(fnGetJsonPropertyValue" into the BT core and is not needed in any of the customInclude.html files anymore. Again, thank you all for the input. I love this BT community.
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/17/13 10:55 PM (11 years ago)
@Red Dog, That is correct. See this GREAT tutorial by Smug Mug http://www.buzztouch.com/files/howtos/CP2Project.pdf
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/18/13 12:58 AM (11 years ago)
Hey I didn't mug nobody, I was framed! ;) Cheers! -- Smug
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/18/13 08:19 AM (11 years ago)
You got it RedDog, it's the php he has replaced with javascript now. You'll also notice that the picker functions for selecting a screen or color, etc... have all changed too. This is the old picker code to select a file name from your SH 2.x panels: <a href="<?php echo $controlPanelURL;?>/bt_pickerFile.php?appGuid=<?php echo $appGuid;?>&formEl=json_videoFileName&fileNameOrURL=fileName&searchFolder=/images" rel="shadowbox;height=550;width=950">Select</a> this is what it should look like now: <a href="#" onClick="fnPickFileName('json_ATEventImageURL', '/images');return false;"><img src="../../images/arr_right.gif" alt="arrow"/>Select</a> Replace the 'json_whatevervariable' with your json variable. and use onClick="fnPickColor to use the color picker function I used Davids new .html includes (located in BT-server/bt_v15/bt_includes) as templates to create my html include files for custom properties I'm using on new plugins I'm making. Duplicate and rename one of those and add it to your config_cp.txt and use it as a template to make your own. The btSection_backgroundImage.html is full of all kinds of goodness and a great one to study. Smugs tutorial (and video lesson) are excellent. NAD also unraveled the childitems mystery last week. Having these documented is GOLD. I actually toyed with the idea of writing some simple php to make creating these sections even simpler. The tricky part is that you don't know what json variable or how many variables a developer needs.... It makes me think that this is why David probably hasn't automated this and why we need to hand code these still!
 
Cakebit
Code is Art
Profile
Posts: 502
Reg: Dec 15, 2010
In your local b...
16,520
like
12/18/13 09:38 AM (11 years ago)
@Smug, You are the most lovable thug I've ever met... ;) It might be a good idea to enroll in the Guam witness protection program. LOL http://www.justice.gov.gu/PromOrder/images/PromOrderNo05-002WitnessandVictimWitnessPrtctnProgGuidelines040105.pdf EDIT: SmugMug is my photo hosting website. I just noticed I typed your name wrong lol.
 

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.