cancel
Showing results for 
Search instead for 
Did you mean: 

Add Image of Site Next to Title.

kyriakos
Champ in-the-making
Champ in-the-making
Hey guys… here is my question. Is there a way when you create a site to add a picture next to the title? which will be different for each site?
7 REPLIES 7

mikeh
Star Contributor
Star Contributor
There's no reason why not - you could add the image as an association on the Site's root folder (similar to how user avatars work).

Thanks,
Mike

kyriakos
Champ in-the-making
Champ in-the-making
thanx for the quick answer mike, could you help me by telling me the files that i should change?

mikeh
Star Contributor
Star Contributor
thanx for the quick answer mike, could you help me by telling me the files that i should change?
I can point you in the right direction.

- First, add an upload control to the Create Site dialog (create-site.get.html.ftl in Share)
- You'll likely have to submit the image in a separate POST request to the Repository, as it may not JSON encode well
- Create a Repository-side webscript to accept the image POST and a siteId. Take a look at the uploadavatar.post webscript, which does the equivalent for user avatars.
- Then modify the site.get webscripts to return a URL to the image
- Finally, modify the Share webscripts (start with collaboration-title.get) to display the Site image from the URL you retrieved above.

There might be other (simpler) ways of achieving this, so be warned this is a quick "off the top of my head" way of doing it.

Thanks,
Mike

kyriakos
Champ in-the-making
Champ in-the-making
thanx very much man Smiley Happy
i apreciate you spend your time to tell me these. but i can't do all this since i am a student yet and i just started in a company
it's good to know that it is possible. hope that others will find it helpfull . plz consider in the future that the user can add a picture to sites when while he creates it.
cheers Smiley Happy

mikeh
Star Contributor
Star Contributor
thanx very much man Smiley Happy
i apreciate you spend your time to tell me these. but i can't do all this since i am a student yet and i just started in a company
it's good to know that it is possible. hope that others will find it helpfull . plz consider in the future that the user can add a picture to sites when while he creates it.
cheers Smiley Happy
I'd have thought this would be an ideal student project to learn both Share and Repository webscripts.

Oh well.
Mike

kyriakos
Champ in-the-making
Champ in-the-making
well this is not for education. i have to make a project for a company . so i am looking for a quicker way.
such as i add a picture to a simple wiki page with the logo Smiley Wink

jrott
Champ in-the-making
Champ in-the-making
Hy,

did you find an easy to do this ?

Thanks.