Profile Tweaks

alt=
Marla
@sweet
one week ago
53 posts
Does Profile Tweaks module also come with form designer to help customize settings?

Thanks!
updated by @sweet: 01/08/25 05:24:01PM
michael
@michael
one week ago
7,772 posts
Profile Tweaks allows the profile owner to adjust their profile. That level of user will not have access to the form designer. The form designer is an admin only (owner of the site) level tool.
alt=
Marla
@sweet
one week ago
53 posts
Hi Michael,

I understand that form designer is for the admin. My question is, does that module use form designer to adjust which areas are customizable?

Thank you,

MM
michael
@michael
6 days ago
7,772 posts
maybe, not sure.... What the Form Designer is is a way to tap into the functionality that modules have but without having to look at code. If you're comfortable looking at code then you have the most amount of flexibility.

Jamroom at its core is for developers then stuff to allow non-developer access has been layered on top so the most access you have is at the code level. Through systems like the "events and listeners" system pretty much anything is adjustable.

Maybe if I understood the goal I can better understand the question.

--edit--
an example: Pretty much all of my sites have a 'tweaks' type module that in-itself doesn't do anything specific but I'll put listeners into it for any adjustments I want to make.
updated by @michael: 01/08/25 04:26:27PM
alt=
Marla
@sweet
6 days ago
53 posts
I basically need control over the CSS, giving options for the user to change.
michael
@michael
5 days ago
7,772 posts
Right, gotcha. Then: currently there is no Form Designer button for that form. Any extra fields would need to be added via a module.

You do have the option of allowing them to change skins, but making one for everybody would be a bigger task than just making a module that allowed them to input .css directly.
on.jpg
on.jpg  •  835KB

tab.jpg
tab.jpg  •  590KB

could.jpg
could.jpg  •  787KB

butto.jpg
butto.jpg  •  711KB

profile.jpg
profile.jpg  •  1MB

alt=
Marla
@sweet
5 days ago
53 posts
I've been waiting 20 yrs for JR to come up with a simple css editor type module for admins and users. I think Profile Tweaks might be a good start.... I have an app that's almost ready for the next step.. adding it to JR as a module.

I wanted to add more inputs in the profile settings page, but I don't understand how to pull the uploaded img url from jrImage display.... all I need is the "url", not img src="url".


Thank you, Michael!
updated by @sweet: 01/09/25 03:57:07PM
michael
@michael
5 days ago
7,772 posts
Here's a cut down module that just has a listener for that form. It has a couple of examples of form fields being added to the page.

Hopefully this gives you a good idea of how to start.
zip
xxTweaks.zip  •  1KB

fields.jpg
fields.jpg  •  646KB

active.jpg
active.jpg  •  802KB

alt=
Marla
@sweet
5 days ago
53 posts
I'll take a look!

Thank you so much!
michael
@michael
5 days ago
7,772 posts
In that module above in the include file under the other form fields if you want to add an image upload, add this form field code
        $_tmp = array(
            'name'     => 'profile_tweaks_css3',
            'label'    => "Custom CSS 3",
            'help'     => "Some other desctiption about what this field does",
            'type'    => 'file',
            'extensions' => 'jpg,png',
        );
        jrCore_form_field_create($_tmp);
That will allow for upload of .jpg or .png files.

If you want those fields to change from the profile tweaks module's form to the PROFILE form instead change the top line from
    if (!empty($_data) && $_data['form_view'] == 'jrProfileTweaks/customize') {
to
    if (!empty($_data) && $_data['form_view'] == 'jrProfile/settings') {
this.jpg
this.jpg  •  559KB

michael
@michael
5 days ago
7,772 posts
From either of those two locations the fields will be saved to the users 'profile' datastore so can be used in any location where the other profile stuff is found, so if in the template you see {$_profile['profile_name']} then you can use {$_profile['profile_tweaks_css3']} to get its value back out.

If in the templates you see {$profile_name} then you can use {$profile_tweaks_css3} to get its value.

if you put {debug} then you can see what values are available to you in templates.
alt=
Marla
@sweet
5 days ago
53 posts
I know I'll have more questions soon.

This helps, thank you!!

Tags