PDA

View Full Version : vBA CMS: add an image beside your links in navigation module


Milad
02-26-2006, 10:00 PM
Version: 1.0.0
vB Version: 3.5.2
Assuming that you have vBAdvanced Version: 2.1.0 installed.

Description:add an image beside your links in navigation module
Details: 1 Template Edit and 1 File Edit.
Difficulty: easy.

Author: Milad (https://vborg.vbsupport.ru/member.php?u=82891)

Installation:


In includes/adminfunctions_vba_cmps.php


Find:

$inputs .= '<tr><td><input class="bginput" name="' . $name . '[' . $pagecount . '][order]" value="' . $navlinks['order'] . '" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][level]" value="' . $navlinks['level'] . '" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][link]" value="' . $navlinks['link'] . '" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][text]" value="' . $navlinks['text'] . '" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td></tr>';

Replace with:

$inputs .= '<tr><td><input class="bginput" name="' . $name . '[' . $pagecount . '][order]" value="' . $navlinks['order'] . '" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][level]" value="' . $navlinks['level'] . '" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][link]" value="' . $navlinks['link'] . '" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][text]" value="' . $navlinks['text'] . '" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][image]" value="' . $navlinks['image'] . '" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td></tr>';

Find:

$inputs .= '<tr><td><input class="bginput" name="' . $name . '[' . $pagecount . '][order]" value="" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][level]" value="" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][link]" value="" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][text]" value="" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td></tr>';

Replace with:

$inputs .= '<tr><td><input class="bginput" name="' . $name . '[' . $pagecount . '][order]" value="" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][level]" value="" size="1" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][link]" value="" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][text]" value="" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td><td><input class="bginput" name="' . $name . '[' . $pagecount . '][image]" value="" size="20" ' . iif($type == 'page', 'onclick="' . $jsdefault . '"') . '/></td></tr>';

Find:

print_description_row($description . '<br /><table align="center" cellpadding="4" cellspacing="0" class="tborder"><tr><td class="thead">' . $vbphrase['order'] . '</td><td class="thead">' . $vbphrase['level'] . '</td><td class="thead">' . $vbphrase['link'] . '</td><td class="thead">' . $vbphrase['text'] . '</td></tr>' . $inputs . '</table>');

Replace with:

print_description_row($description . '<br /><table align="center" cellpadding="4" cellspacing="0" class="tborder"><tr><td class="thead">' . $vbphrase['order'] . '</td><td class="thead">' . $vbphrase['level'] . '</td><td class="thead">' . $vbphrase['link'] . '</td><td class="thead">' . $vbphrase['text'] . '</td><td class="thead">' . $vbphrase['image'] . '</td></tr>' . $inputs . '</table>');


In adv_portal_navigationbits template find:

$navmark

Replace with:

<if condition="$navlinks[image]"><img src="$navlinks[image]" alt="$title" align="middle" /><else />$navmark</if>

Edit your "Site Navigation" module and add an image's URL for every link (or page) you want. Be noticed: "Image" field is optional.

Click https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=109003) to receive updates.
Done! Thank you for installing.

Changelog:
Feb, 27th 2006: (1.0.0)
Initial release


Support is free-time controlled.

sensimilla
02-27-2006, 04:29 AM
There is a better navigation module than default one available for download at vbadvanced..
Thanks anyway for your work, someone might need it.

3mr3
02-27-2006, 06:02 AM
cool thanks :)

Zia
02-27-2006, 02:54 PM
nice..but does that works only with the defult menu?

Milad
02-28-2006, 02:13 AM
Yes this is a modification for the default menu only.