[MOD] Department Images
4 posts
• Page 1 of 1
[MOD] Department Images
So, I decided to whip up this mod here, since I had to hunt for the code in a couple of different threads on the forums that way people can find it if they need it. Thank you Agent for supplying the needed code. I hope others find this mod useful like I have. Remember to follow all 8 steps, failure to do both edits, causes positions to be listed in the wrong area. Thanks!
1. Using the Seamless Replacement Option as it's easier, find personnel_index.php, which can be located within the "/public_html/nova/modules/core/views/_base/main/pages" and copy the file into "/public_html/application/views/_base_override/main/pages/" path
2. Once you've copied the file into the override folder, Open it.
3. Find the following code (near lines 73-75)
- Code: Select all
<tr>
<td colspan="5"><h3><?php echo $dept['name'];?></h3></td>
</tr>
4. Replace with
- Code: Select all
<tr>
<h3><img src="<?php echo base_url();?>/images/departments/<?php echo strtolower(str_replace(' ', '_', $dept['name']));?>.png" alt="<?php echo $dept['name'];?>"></h3>
</tr>
5. OPTIONAL Change the file path and extension as needed.
6. Find the following code (near lines 128-131)
- Code: Select all
<tr>
<td class="col_15"></td>
<td colspan="4"><h4><?php echo $sub['name'];?></h4></td>
</tr>
7. Replace with
- Code: Select all
<tr>
<h3><img src="<?php echo base_url();?>/images/departments/<?php echo strtolower(str_replace(' ', '_', $dept['name']));?>.png" alt="<?php echo $dept['name'];?>"></h3>
</tr>
8. Upload the images you are using for your departments to the same directory that is listed in the code above. I used "domain/images/departments".
9. Check your Personnel Link and you should see images instead of names for your departments. Your done!


Re: [MOD] Department Images
Thanks for the MOD!Re: [MOD] Department Images
Part 7 should have been the following.- Code: Select all
<tr>
<td class="col_15"></td>
<td colspan="5"><h4><img src="<?php echo base_url();?>application/assets/images/departments/<?php echo strtolower(str_replace(' ', '_', $sub['name']));?>.png" alt="<?php echo $sub['name'];?>"></h4></td>
</tr>
Specifically $sub['name'] not $dept['name']
I was banging my head for an hour wondering why the sub-dept name image wasn't appearing.
iTrooper
-
-
Posts: 5
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest