Jump to content

Support department images


hobbit666

Recommended Posts

I'm also interested in changing those texted links to images. I know the template is supportticketsubmit-stepone.tpl but I dunno how I would go about making the images different when I create new departments.

 

Would I have to write it like:

 

{if $department.id = 001}{/if}

{if $department.id = 002}{/if}

{if $department.id = 003}{/if}

{if $department.id = 004}{/if}

{if $department.id = 005}{/if}

 

and so on... ?

Link to comment
Share on other sites

why don't you put images in language.txt ?

 

I do all the time because I want to minimize touching my template because of future upgrades

you have to do it this way

<img src='yourimage.gif'> support department

do not use "yourimage.gif">

 

you can do a lot of things with this trick:lol:

Link to comment
Share on other sites

<table width="100%" border="0" align="center" cellpadding="12" cellspacing="0" style="border: 1px solid #e0e0e0;">

{foreach key=num item=department from=$departments}

<tr style="border: 1px solid #e0e0e0;">
<td width="10%"><div align="center">{if ($department.id == '001')}<a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}">
     <img src="images/support/clientarea.gif" alt=""></a>{/if}</div></td>
<td width="40%">{if ($department.id == '001')}{$department.description}{/if}</td>
<td width="10%"><div align="center">{if ($department.id == '002')}<a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}">
     <img src="images/support/clientarea.gif" alt=""></a>{/if}</div></td>
<td width="40%">{if ($department.id == '002')}{$department.description}{/if}</td>
</tr>

<tr style="border: 1px solid #e0e0e0;">
<td width="10%"><div align="center">{if ($department.id == '003')}<a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}">
     <img src="images/support/clientarea.gif" alt=""></a>{/if}</div></td>
<td width="40%">{if ($department.id == '003')}{$department.description}{/if}</td>
<td width="10%"><div align="center">{if ($department.id == '004')}<a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}">
     <img src="images/support/clientarea.gif" alt=""></a>{/if}</div></td>
<td width="40%">{if ($department.id == '004')}{$department.description}{/if}</td>
</tr>


{/foreach}

</table>

 

I've tried different configuration of the code but haven't been able to get them align.

 

I really would like the description under the images which I did already but they weren't aligned. Thanks for ya'll assistance.

Link to comment
Share on other sites

The easiest way to do this I would say, forget the variable and scripting! Just put a table with your preferred style then insert the hyperlink with deptid.

 

:arrow: e.g :

<a href="{$SERVER.PHP_SELF}?step=2&deptid=001"><img src="images/support/image1.gif" alt="">

Your Description Here!</a>

 

<a href="{$SERVER.PHP_SELF}?step=2&deptid=002"><img src="images/support/image2.gif" alt="">

Your Description Here!</a>

 

I hope this helpful for you.

 

Ronnie

Link to comment
Share on other sites

why use all the if statements, why not just name your support dept icons supporticon001.gif, supporticon002.gif, etc then you can do as follows. you can even add in a link from the image almost the same way.

 

for exampla from this:

{foreach key=num item=department from=$departments}

<li><a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}"><strong>{$department.name}</strong></a> - {$department.description}</li>

{/foreach}

 

 

to this{foreach key=num item=department from=$departments}

<li><a href="{$SERVER.PHP_SELF}?step=2&deptid={$department.id}"><img src="images/supporticon{department.id}.gif"><strong>{$department.name}</strong></a> - {$department.description}</li>

{/foreach}

Link to comment
Share on other sites

I'm gonna add different icons for different depts, those there are just for testing, and I'm gonna add a few more dept ids so I can add departments later and have the code there already.

 

So dept001 = icon1.gif, dept002 = icon2.

 

The problem I have is just the alignment which I'm trying to achieve which is 2 rows 2 columns.

Link to comment
Share on other sites

you will probably need to do a short counter with a while loop. to create 2 cells and then start a new row. you can probably google creating dynamic table columns and get a solution. the quesiton is what order you want them to appear. And what are you going to do when matt updates his code again. a lot of uis here quit doing custom stuff because this product is continually evolving and its a lot of work to continually go through and update changing templates and code every time.

 

and as far as the graphic names you see i was using the departments id variable to name the graphic, what you have shown above will not work. you will need to use the full variable 001, (icon001.gif) 002 (icon002.gif) etc if you want this idea to work. You also need to use the code I show above to set the variable into the icon name. That way the name of the image is created on the fly to match the specific topic. I know this will work because i used it myself in the past.

Link to comment
Share on other sites

Can you show me an example of

" you will need to use the full variable 001, (icon001.gif) 002 (icon002.gif) etc if you want this idea to work. You also need to use the code I show above to set the variable into the icon name. That way the name of the image is created on the fly to match the specific topic. I know this will work because i used it myself in the past.

"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated