Forum Activity for @ultrajam

SteveX
@ultrajam
04/13/14 01:27:51PM
2,589 posts

jamroom.net jrDocs autolink


Jamroom Developers

https://www.jamroom.net/ultrajam/documentation/modules/1770/googlemaps#examples-demo-and-docs
I made a text section with two links in, but the second link isnt being parsed correctly because it is similar to the first.

If I change the second url to
http://jam.ultrajam.net/googlemaps/docsdeveloper_docs
It breaks in the same place.

But if I change it to
http://jam.ultrajam.net/googlemaps/xxxxxdocs/developer_docs
Then both urls are whole.
updated by @ultrajam: 05/15/14 03:31:58AM
SteveX
@ultrajam
04/12/14 02:51:49PM
2,589 posts

jrFoxyCart_add_to_cart Button


Jamroom Developers

They're smarty functions in /modules/jrFoxyCart/lib/functions.php

smarty_function_jrFoxyCart_add_to_cart
SteveX
@ultrajam
04/11/14 10:48:13AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Ok, thanks Brian. I'll give that a try over the weekend.
SteveX
@ultrajam
04/11/14 08:15:02AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Yes, I see that now, it works fine as a field in a module item.

It's a javascript color picker where the js can have several options and events to configure the color picker.

I wanted to pass these options in as attributes to add data- attributes to the input.

The intention was to be able to pass them in in the options field in form designer and have it work for module items as well, but it is actually in a config setting that I wanted to use it.

The attributes:
Quote:
// flat: bool,
// showInput: bool,
// showInitial: bool,
// allowEmpty: bool,
// showAlpha: bool,
// disabled: bool,
// localStorageKey: string,
// showPalette: bool,
// showPaletteOnly: bool,
// showSelectionPalette: bool,
// clickoutFiresChange: bool,
// cancelText: string,
// chooseText: string,
// containerClassName: string,
// replacerClassName: string,
// preferredFormat: string,
// maxSelectionSize: int,
// palette: [[string] ] ,
// selectionPalette: [string]

The script: http://bgrins.github.io/spectrum/
updated by @ultrajam: 04/11/14 08:15:40AM
SteveX
@ultrajam
04/11/14 07:57:06AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Brian.

Should that also work for a jrCore_register_setting function in config.php?

I already had an attributes function, but I'm not seeing any attributes in the fdebug.
SteveX
@ultrajam
04/11/14 02:51:17AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

The help text is fine, but I've run into another problem - maybe attributes aren't the right way to go?

How do I get those attributes into the form_field_display function?

I have them defined in a form_field_spectrum_attributes function, but don't see them in my fdebug when passing that into the form_field_display function $_tmp array as either
'attributes' => array('myattribute1','myattribute2'), 
or as
'myattribute1' => 'xxx',
'myattribute2' => 'yyy',

How do I get those attributes in there?
updated by @ultrajam: 04/11/14 02:53:20AM
SteveX
@ultrajam
04/11/14 01:57:26AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Michael, I think I'm going to take your first suggestion and just link to the module docs by appending a line to all form designer options help text (if the color picker is installed):
/**
 * Append to help text of form designer options field
 * @param $_data array Array of information from trigger
 * @param $_user array Current user
 * @param $_conf array Global Config
 * @param $_args array additional parameters passed in by trigger caller
 * @param $event string Triggered Event name
 * @return array
 */
function ujFullSpectrum_form_field_create_listener($_data, $_user, $_conf, $_args, $event)
{ if (isset($_data['name']) && $_data['name'] == 'options' && isset($_data['sublabel']) && $_data['sublabel'] == 'see <strong>help</strong> for what is allowed here') { $_data['help'] = $_data['help'].'<br><br>&bull; If this is a <strong>spectrum</strong> color picker field, the options can be used to configure the color picker. See the module docs for details.'; } return $_data; }
SteveX
@ultrajam
04/11/14 01:26:18AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Michael, I don't think that will work though, it would change the help text for all form designer options fields. I guess I could add to the text for all form designer options fields though, so it might work that way.

I can't see anything in the log which would allow me to differentiate between my field and other form designer fields (the field type hasn't yet been set at the point where the help shows):

Quote: fdebug('ujFullSpectrum_form_field_create_listener',$_data, $_args, $event);

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
|ujFullSpectrum_form_field_create_listener|

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
Array
(
[name] => options
[label] => options
[sublabel] => see help for what is allowed here
[help] => • If this field is a select, select_multiple, radio or optionlist field, you can enter the form options ONE PER LINE, in the following format:Option Value|Option TextYou may also enter a valid module FUNCTION name that will return the options dynamically.• If this is a file field, you can enter the allowed file extensions as a comma separated list - i.e. "txt,pdf,doc,xls" - only files of these types will be allowed to be uploaded.• If this is a chained_select field, the options are created using the Chained Select module - set this to the Option Set Name you have created in the module.
[type] => textarea
[value] =>
[validate] => printable
[required] => 0
[module] => jrCore
)

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
Array
(
[module] => jrAudio
[form_name] => jrAudio_form_field_update
[designer] => 1
)

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
|form_field_create|
SteveX
@ultrajam
04/11/14 12:37:29AM
2,589 posts

referral program


Suggestions

If they are your own clients, why would you need them to click on your affiliate link?
  171