HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Adding images to the profile?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#65443 (In Topic #14037)
Avatar

Well-settled

Currently i modify the members.php a bit but came to asmall problem. when i "intercept" costum profile fields and try to add pictures into them (type Block of Tranbslatable/Comcode Text) i cant neither use or [_img] for it - both tags are not interpreted but only shown as regular text. I thought of using attach() from the comcode class, but i dont know how to attach it to the field... Any advises for it? Oh - and modifiing the Template is not possible at the moment.
Back to the top
 
Posted
Rating:
#65444
Avatar

Showing a code portion would help us answer. Not sure exactly what your scenario is.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#65445
Avatar

Well-settled

Oh, ok.
I am in members.php and entered at line 379 (Custom Fields), there i have added the following lines of code:

Code

query_select( "achievement_taxa" );
foreach ($taxa as $trow)
{
if($trow["ID"] == $row["aid"])
{
//$value .= "[img param=\"\"]http://www.alphaclan.org//forum/abc[/img]\n" ;
$value .= "[img http://alphaclan.org/Games/Achievements/".$trow["Picture"]."-u.png\""]http://ocportal.com/forum/topics/new_post/\[/img] \n";
$value = ($value);
}
}
//echo $row["aid"]." ";
}
}

Now, as you can see the $value is what is passed in the Profile field, yet in plain text and not interpreted. ANd i would love to see those images as images and not as text ,0)

I hope that makes it clearer?


Last edit: by Chris Graham
Back to the top
 
Posted
Rating:
#65446
Avatar

There's a line in the ocPortal code:

Code


            if (!is_object($value)) $value=escape_html($value);
I guess that is killing your HTML. Change to using HTML instead of Comcode and put your code after that line.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#65447
Avatar

Well-settled

Thank you, that was what was giving me some trouble.

Merry christmas :0)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: