What this does
- Adds Logo Image element to the schedConf Step 1 details forms for each Sponsor. A URL to an image.
- Displays the image beneath the sponsor name on the About - Organising Team page.
The patches..
It's really only done by adding 7 simple lines, mostly cloned and modified from other existing lines! Don't be afraid
templates/manager/schedConfSetup/step1.tpl
- Code: Select all
--- templates/manager/schedConfSetup/step1.tpl.orig 2008-06-10 13:35:01.000000000 -0400
+++ templates/manager/schedConfSetup/step1.tpl 2008-06-10 14:52:14.000000000 -0400
@@ -178,6 +178,10 @@
<td width="20%" class="label">{fieldLabel name="sponsors-$sponsorId-url" key="common.url"}</td>
<td width="80%" class="value"><input type="text" name="sponsors[{$sponsorId|escape}][url]" id="sponsors-{$sponsorId|escape}-url" value="{$sponsor.url|escape}" size="40" maxlength="255" class="textField" /></td>
</tr>
+ <tr valign="top">
+ <td width="20%" class="label">{fieldLabel name="sponsors-$sponsorId-logourl" key="manager.setup.layout.useImageLogo"}</td>
+ <td width="80%" class="value"><input type="text" name="sponsors[{$sponsorId|escape}][logourl]" id="sponsors-{$sponsorId|escape}-logo" value="{$sponsor.logourl|escape}" size="40" maxlength="255" class="textField" /></td>
+ </tr>
{if !$smarty.foreach.sponsors.last}
<tr valign="top">
<td colspan="2" class="separator"> </td>
- A couple questions here.. could I use a better key for the label? Ideally it'd also say "URL" but I wasn't sure how to concatenate two items in a key. I also didn't want to add anything to locale files.
- Is logourl an okay variable name to use? I kept it as simple as a I could and hoped to not overlap usage in other places.
- Code: Select all
--- templates/about/conferenceSponsorship.tpl.orig 2008-06-10 14:53:23.000000000 -0400
+++ templates/about/conferenceSponsorship.tpl 2008-06-10 15:04:51.000000000 -0400
@@ -34,6 +34,9 @@
{else}
<li>{$sponsor.institution|escape}</li>
{/if}
+ {if $sponsor.logourl}
+ <li style="list-style-type:none"><a href="{$sponsor.url|escape}"><img src="{$sponsor.logourl|escape}"></a></li>
+ {/if}
{/if}
{/foreach}
</ul>
Note in the last snippit, I inserted the logo as a list item, but set the style to none, so no bullet would be shown. I'm not sure if I should hardcode this or refer to an existing style class. Any suggestions?
What I want to do next
- Write instructions for Creating a new block
- Publish Sponsor Logos Block Plugin -- now working
