PDA


View Full Version : Style


coffee2k3
08-24-2005, 01:56 PM
Hi,

I've had Links Directory for quite a while now and recently upgraded my boards to 3.5. I installed Links again, then I tried to set style (global.php) as it was directed with 3.0,

if (VBA_SCRIPT == 'links_directory')
{
$codestyleid = X;
}

It doesn't seem to be working anymore. Could you please let me know what I should change to have a different style for my links directory?

While at it, is there a chance to set style per link category? Please? :)

coffee2k3
08-25-2005, 04:32 AM
Halleluja, my fault... I had a bad reference and put 'links' instead of 'links_directory', sorry.

The other part of the question .... Set style by category, would be much appreciated.

Brian
08-25-2005, 02:51 PM
Approximately how many categories do you have that you want to have a forced style for? Will all the categories that you want to change have a different style, or will most have the same?

coffee2k3
08-25-2005, 04:38 PM
Brian,

Thanks for replying. I'd like to have 3-4 different categories with their respective styles...

Brian
08-25-2005, 06:57 PM
Actually, now that I think about it that's not going to be that easy. It could be done on the browselinks.php page farily easily, but wouldn't follow over into the showlink.php page and such in all conditions.

coffee2k3
08-26-2005, 12:51 PM
Brian, thanks. I really don't mind editing as many files as needed to get this done.

coffee2k3
08-31-2005, 03:09 AM
It could be done on the browselinks.php page farily easily, but wouldn't follow over into the showlink.php page and such in all conditions.

Sorry to bump thread, but could you please share how it's done on browselinks.php? Maybe different styles per categories could be included in future releases, or am I the first to ask for it? :)

coffee2k3
09-02-2005, 02:31 AM
bump

Brian
09-02-2005, 01:26 PM
In your forum/global.php file look for this code:
// #############################################################################
// ######################## START TEMPLATES & STYLES ###########################
// #############################################################################


Right below that add:
if (VBA_SCRIPT == 'links_directory')
{
if (intval($_REQUEST['c']))
{
$_REQUEST['catid'] = $_REQUEST['c'];
}

switch ($_REQUEST['catid'])
{
case 1:
$codestyleid = X;
break;

case 2:
$codestyleid = Y;
break;

case 3:
$codestyleid = Z;

default:
$codestyleid = A;
}
}

Change the catids after each 'case' statement to a valid catid, then change the $codestyleid just below to the styleid you want used for that category.

coffee2k3
09-16-2005, 05:14 AM
Thanks Brian, works great, even on showlink.php. The only thing it wouldn't follow over is when replying to a link, but will probably survive without that lol.

Thanks again.

1 tiny thing, I had to add

case 3:
$codestyleid = Z;
break;