Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How can I use a different logo for each survey, but without changing de template

  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #109980 by helviobrito
Hi.

Please help me. I've alreedy looked into the forum and the mamual and didn't find a clear answer for may issue.

I use LM 2.05+ Build 140302 and a mdified version of Vallendar template. I need to change the logo for each survey, but I didn't figure out how to do this. Can anone help me?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110000 by tpartner
In the template file, you can use the placeholder for the survey ID in the filename of the logo image.

So, something like:

Code:
<img src="path/to/images/logo-{SID}.png" />

.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: helviobrito
The topic has been locked.
  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110022 by helviobrito
Thanks for your attention, tpartner. But, please, I'd like to know which template file I'll use to put this line in: survey. pstpl or starpage.pstpl?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110023 by tpartner
It depends on where your logo is - probably in startpage.pstpl.

What template are you using? Can you activate a sample survey?


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110024 by tpartner
It depends on where your logo is - probably in startpage.pstpl.

What template are you using? Can you activate a sample survey?


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110025 by helviobrito
I am using Vallendar, with a little modification only to change the color of warning texts from pink to red.

Here is a survey that you can see as an example: focuspesquisa.com.br/focusOnline/181521/lang-pt-BR .

See the logo focusOnline in the questions page? I'd like to change it only in this survey, for example, not affecting the others active ones.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110027 by holch
Can't access the survey without a token and on the startpage there is no logo.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110028 by holch
But Tpartners solution would affect all other surveys that depend on this template that you use.

But I think it is a very elegant solution, if you have many surveys and they all need a different logo. You just put the logo file into the respective folder with the Survey ID in the file name and the template will use this file.

However, this change will affect all previous surveys, because they don't have the correct name and one disadvantage is that you would have to create a logo file for each survey, even if the logo stays the same. So if you usually use always one logo and just for this survey you need to use another one, I think it is easier to copy the template and change the logo file.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110029 by helviobrito
Sorry. Use the login Testing and the token 123456.

So, I think that the logo goes in the survey.pstpl. My generic logo url is there. So, supose I have an image named newlogo.png and I want it just in the survey with the ID 181521. Do I change the images's name to newlogo-181521.png?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110030 by tpartner
Yeah, no access for me either.

I think it is easier to copy the template and change the logo file.

No, we can do it dynamically for a single with JavaScript but I would need to see a survey to give the script details.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #110031 by tpartner
Still don't see a logo. That survey is using the default template with no logos.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • helviobrito
  • helviobrito's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 9 months ago #110032 by helviobrito
Yes, I agree. I didn't think of copy the template for each survey. But I had a doubt it the logo name with the survey ID solution wouldn't affect all previous surveys, as you said, hotch. Thanks.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose