user tip advanced tip give your members style control of thier profiles!

soaringeagle
@soaringeagle
11 years ago
3,304 posts
this is a simple example but all the building blocks are there to alow your members to choose some basic styling options
what those options might be are up to you

i beleive you should even be able to use the spectrum module as a color picker to alow passing of color values to elements!
for ning users this is a build your own design studio potentially!

this simple example @douglas helped with the 1st peices of the puzzle and now its starting to click as to how things work, withg a lil trial and error i was able to do 2 things with very lil code

1 add the ability to put up a custom profile cover photo
and if desired move it behind a partialy transparent layer
as well as add a lil style to the cover photo container

ok on with the lesson
(and im grinning ear to ear now that things are starting to make sence)

step 1
in the profile creation, and profile modification forms open the form designer create the following fields
profile_cover_image
profile_z

give them any title description help text u think they need
make profile image a file field and z a checkbox
dont forget to check make active before saving
and assign the quotas you want to have access to them

now in your skin templates modify the profile_header.tpl

at top you will see

<div class="container">
this will be our cover photo container
so find that and edit as so

<div class="container profilecover {if isset($profile_z)}cover-z{/if}">

{if isset($profile_cover_image_size) && strlen($profile_cover_image_size) > 0}
{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_cover_image" item_id=$_profile_id size="xlarge" class="img_scale" alt=$profile_name title=$hover width=false height=false}
{/if}

now let me explain what im doing here ..and thank you @douglass for helping me wrap my brain around the 1st peices of the puzzle
1st
<div class="container profilecover {if isset($profile_z)}cover-z{/if}">
i'm adding a profilecover class so i can style the cover photo with rounded tops and a box shadow then if the checkbox is checked adds the class cover-z

and then
{if isset($profile_cover_image_size) && strlen($profile_cover_image_size) > 0}
{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_cover_image" item_id=$_profile_id size="xlarge" class="img_scale" alt=$profile_name title=$hover width=false height=false}{/if}
1st it checks to see if you have uploaded a profile cover image and its bigger then 0
next line calls the image handler function that basically just builds an image tag
it says to look for an image in the jrprofile module
of type profile_cover_image (the name we gave the field within the profile module)item_id sets the profile number (1 being the creator) and size (required by the image handler even thiugh the docs say its optional)

now that code builds this code
<img class="img_scale" alt="Soaring Eagle" src="http://greentechnologyforums.com/profile/image/profile_cover_image/1/xlarge/_v=1414984633">
the -v=..not sure where that comes from my guess is a cache handler

but you can see how the bits and peices fit together adding directory entries into the path

so that will only display a cover photo if ones been uploaded instead of putting up a default

next 2 lil peices of css


.container.profilecover > img {
  -webkit-border-radius: 3em 3em 0 0 !important;-moz-border-radius: 3em 3em 0 0 !important;border-radius: 3em 3em 0 0 !important;
  -webkit-box-shadow: 0 0 0.3em 0.1em rgba(63,127,140,.7);-moz-box-shadow: 0 0 0.3em 0.1em rgba(63,127,140,.7);box-shadow: 0 0 0.3em 0.1em rgba(63,127,140,.7);
  margin: 1em;
  position: relative;
  width: -moz-available;
  
}
this styles the cover photo with border-radius and box-shadow on every cover photo
you can adapt this to alow users to turn on or off any of these options with a checkbox or radiobutton or probably set tyhe color and radius values

and
.cover-z img {z-index:-1;}
if they checked the z index checkbox


example of a profile with z index off
http://greentechnologyforums.com/demo-noz
and z index on
http://greentechnologyforums.com/soaring-eagle

theres a module called spectrum that alows you to pick a color from a full spectrum color picker the spectrum can be added to a form designer feild and alow members to change css values

imagine the possibilities

you can build your own design studio giving them the control you choose to give them


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 07/09/16 09:21:02AM
michael
@michael
11 years ago
7,793 posts
Great write-up @soaringeagle glad to hear your getting the hang of it. Thanks for providing this for everyone.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
update
note the demo-noz profiles now got a new heading color
simply added the spectrum and a inline style statement if its set to use the chosen color

but brian douglas whoeever
whats thed option to reset it to default
thats the thing i cant seem to figure out
but

kos
strum
ken
all ya ningsters..islander srry almost forgot ya
u see the power potential dont ya?
build your own design studio

i think it can verify code ..or parameters i should say adhere to rules u set ie ifyour alowing settings for border-radius on like the profile image i think u maybe can verify that it contains either % em or px values?
im still playing with it but its like a kid in a candystore i got a new toy and figuring out what can be done with it

we really should be able to build our own fully functional profile design tools
that will not break responsiveness


oh and i just got a coder whos eager to help hes been a member fir ..well since the very begining almost



paul douglas brian ande..um forgetthe 4th..srry do u guys mind if we have a "tips" section
on creators that was1 of the best things about it was other creators sharing tips ..wether it was design tips for a feature or lil tricks and tips like these


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
added:
https://www.jamroom.net/ning-to-jamroom/forum

Quote:
Tips
ยป share your design tips, ideas for a feature or lil tricks.

Feel free to share all the cool tips you figure.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
michael:
Great write-up @soaringeagle glad to hear your getting the hang of it. Thanks for providing this for everyone.

my pleasure and will love helping others adjust..srry i blanked onyour name there
been coding and importing and trying my damnedest to figure this all out with very lil sleep all week

i mean i wake up inspired working on it before i even turn on the coffeemaker

literaly when i have slept its open eyes turn on monitor reach for mouse and keyboard and probably work on it a good hour before remembering to eat or make coffee

i think tomorow ill be working with someone who will be helping me out so i think in a few days ill have figured out at least simple module creation


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
no worries. I've been away for a bit, trying to catch up on whats been going on now. Figured i was "um forget the 4th guy" so you got there. ;)
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
haha yea well remembered the face just talked to the others alot more

you guys sure do work fast

the 4 of you ..with 2 of ya being away have done more in a week then nings done in 6 months with teams of engineers and millions of dollars in backing


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
hmm micheal i thought i had that right but seems to be applying the zindex wether checked or not i think it needs to check the profile id maybe
?


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
just when i thought i had it all figured out im confused again

in the image code i set tyhe fieild up as profile_cover_image
i swear thats what i was using ..along with the size for strlen

but when i remove it so its the way i thought it should be..the way i swear i had it to begin with
it works on my profile but not the demo
and the z-index is applied wether checked or not


i think i might still need a hint


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
michael
@michael
11 years ago
7,793 posts
One of the most useful functions when things aren't going as expected is {debug}

"{debug}"
http://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug


In your code above, you asking the templates
 {if isset($profile_z)}cover-z{/if}
to check that $profile_z is set. And if it is set then to add that class 'cover-z' to the list of classes.

The key is that not all variable names are the same in all templates. So if you throw a {debug} in the template where you want to use it (then do the usual clear the caches, then refresh the page) you will be able to see all the variable names that are available to you in that location.

So what you want to do is just check that all the variable names are as you want them to be for the check.
updated by @michael: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
i changed the ckass changed it to a id too ill figure it out after iu get some sleep


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
SE - Unless you give me a "brain transplant", I'm afraid I won't be building a design studio anytime soon. lol

There is so much 'gobble-de-goop" above, that you lost me shortly after: "This is a simple example..."


--

Ken Rich
indiegospel.net

updated by @ken-rich: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
its really not that hard though i dont have it working perfectly yet
and when i do you should be able to do a find and replace install but ill do tye full documentation on that
im really working randomly when i spot something i fix it biuncing all over im about to drink some coffee and tackle the design studio again

dont think i slept again even tho i was soooo tired


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
ah so simple now that i used debug then did a lil searching

<div class="container profilecover" {if $profile_z == 'on'}id="profile_z"{/if}>

i misunderstood the use of isset

ken its simple when a check box is checked it passes the value 'on'
the if checks to see if the value of profile_z is equal to on if so it adds the id


see it really isnt that dificult
its just new
takes figuring out


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM
soaringeagle
@soaringeagle
11 years ago
3,304 posts
ok guys
feel free to join and test
i got a profile image rounder i can set to slightly .5em lil more 1em more 2 em 25% and 50% with a simple selection dropdown

i got a heading ..title the profile name color picker the cover photo with z index adjust
grinning


for the profile image rounder
in the profile template
header i think..same 1 as before i believe
look for
<div class="profile_image {$profile_photo_radius}">
search for profile image add that part in the {}'s
then in the profile modification form add new form field profile_photo_radius
type select

give it a name help description etc and enter these values in the textarea bod

r0|none
half|slightly rounded
oneem|little more rounded
twoem|even more rounded
r25|25% rounded
r50|50% rounded

then in css add

.profile_image.r50 img{-weblit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;}
.profile_image.r25 img{-webkit-border-radius:25%;-moz-border-radius:25%;border-radius:25%;}
.profile_image.half img{-webkit-border-radius:.5em;-moz-border-radius:.5em;border-radius:.5em;}
.profile_image.0neem img{-webkit-border-radius:1em;-moz-border-radius:1em;border-radius:1em;}
.profile_image.twoem img{-webkit-border-radius:2em;-moz-border-radius:2em;border-radius:2em;}
.profile_image.r0 img{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}

there u go you got a profile image rounder

now i was on tech support over my broken archiver with ning and i said to dustin "i dont get why it takes you guys 6 months to a year to do evgery lil thing with million in respources and teams of engineers i dont know what the f im doing and im building a design studio mysdelf in days..." hus reaction was .. ukmmwell umm ughhh cool i guess
lol


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/29/14 09:23:54AM

Tags