[solved] Editing Va...
 
Notifications
Clear all

[solved] Editing Variables.php

9 Posts
2 Users
0 Reactions
1,763 Views
(@fikgirl)
Posts: 21
Eminent Member
Topic starter
 

I'm modifying an existing skin, and I wanted to change the top upper left menu to have "Categories" and "Series" in addition to what's already there. Is this even doable? I looked at the variables.php, but when I added a new to the array, I got an error.

My site is viewable here.


 
Posted : 24/01/2008 8:48 am
(@jacynthe)
Posts: 242
Estimable Member
 

No need to go into variables because I am guessing you want that in every skin not just one no?

Go into your admin panel... clicl on blocks/menu (click the options link for the menu)... Then select categories and series to add.


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 24/01/2008 9:41 am
(@fikgirl)
Posts: 21
Eminent Member
Topic starter
 

That didn't work. This particular skin has a lot of stuff "hard coded" in the variables.php.

Here is the variables.php file:

<?php

$blocks["categories"]["status"] = 2;
$blocks["categories"]["template"] = "{image} {link} [{count}] <div>{description}</div>";
$blocks["categories"]["columns"] = 0;
$blocks["featured"]["status"] = '0';
$blocks["info"]["status"] = 2;
$blocks["info"]["style"] = 0;
$blocks["menu"]["status"] = '1';
// We're going to reserve key 5 for the "account info" link, but only add it if they're logged in.
$blocks["menu"]["content"] = array (
0 => 'home',
1 => 'browse',
2 => 'recent',
3 => 'search',
4 => 'tens',
5 => 'members'
);
// Now we'll sort the menu links so they show in the order we want.
ksort($blocks['menu']['content']);

$blocks["menu"]["style"] = 1;
$blocks["footermenu"] = array(
"title" => "",
"status" => "1",
"file" => "menu/menu.php",
"style" => 1,
"content" => array (
0 => 'help',
1 => 'rules',
2 => 'contactus'
)
);
if(isMEMBER) {
/* First add the new links to the link array. We'll start the numbering on these at 100 just in case, but shouldn't matter anyway. */
$pagelinks['newstory'] = array("id" => 100, "text" => _ADDNEWSTORY, "url" => _BASEDIR."stories.php?action=newstory", "link" => "<a href="""._BASEDIR."stories.php?action=newstory".""" title=""._ADDNEWSTORY."">"._ADDNEWSTORY."</a>");
$pagelinks['editbio'] = array("id" => 101, "text" => "Edit Bio", "url" => _BASEDIR."user.php?action=editbio", "link" => "<a href="""._BASEDIR."user.php?action=editbio".""" title="Edit Bio">Edit Bio</a>");
$blocks["membermenu"] = array(
"title" => "",
"status" => "1",
"file" => "menu/menu.php",
"style" => 1,
"content" => array (
0 => 'login',
1 => 'editbio',
2 => 'newstory',
3 => 'adminarea',
4 => 'logout'
)
);
}
$blocks["login"]["status"] = 1;
unset($blocks["login"]["template"]);
$blocks["login"]["form"] = 1; // Long form with register and lostpassword options
$blocks["random"]["status"] = 2;
$blocks["recent"]["status"] = 2;
$blocks["recent"]["tpl"] = 1;
// $blocks['recent']['num'] = 0;
$blocks["skinchange"]["status"] = '1';
$blocks["news"]["status"] = 2;
$blocks['news']['num'] = 3;
$new = "<span class='new'>New!</span>";
if(isset($blocks['poll']['status'])) $blocks['poll']['bar'] = $skindir."/images/369_bar.jpg";
$displayprofile = 1;

// $featured = "<img src="'".$skindir."/images/featured.gif'" alt='"._FEATURED."' style='vertical-align: middle;'>";
// $retired = "<img src="'".$skindir."/images/retired.gif'" alt='"._RETIRED."' style='vertical-align: middle;'>";
if($current == "home") {
$star = "<img src="'".$skindir."/images/star2.gif'" alt='"._STAR."'>";
$halfstar = "<img src="'".$skindir."/images/halfstar2.gif'" alt='"._HALFSTAR."'>";
}
else {
$star = "<img src="'".$skindir."/images/star.gif'" alt='"._STAR."'>";
$halfstar = "<img src="'".$skindir."/images/halfstar.gif'" alt='"._HALFSTAR."'>";
}
$new = "<img src="'".$skindir."/images/newF00.gif'" alt='"._NEW."' style='float: right; vertical-align: top; margin: 0 35px;'>";
$featured = "<img src="'".$skindir."/images/featured.gif'" alt='"._FEATURED."' style='float: left;'>";
$retired = "<img src="'".$skindir."/images/retired.gif'" alt='"._RETIRED."' style='float: left;'>";
?>

 
Posted : 24/01/2008 9:45 am
(@jacynthe)
Posts: 242
Estimable Member
 

okay then do this... well try this anyways.

Where you have


$blocks["menu"]["content"] = array (
0 => 'home',
1 => 'browse',
2 => 'recent',
3 => 'search',
4 => 'tens',
5 => 'members'
);

change to


$blocks["menu"]["content"] = array (
0 => 'home',
1 => 'categories',
2 => 'series',
3 => 'browse',
4 => 'recent',
5 => 'search',
6 => 'tens',
7 => 'members'
);

Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 24/01/2008 11:55 am
(@fikgirl)
Posts: 21
Eminent Member
Topic starter
 

That didn't change anything.  😳

The menu looks exactly the same as before the change.


 
Posted : 24/01/2008 1:06 pm
(@jacynthe)
Posts: 242
Estimable Member
 

I see Series added to the menu, right besides Home though.. and it wasn't there before.


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 24/01/2008 1:35 pm
(@jacynthe)
Posts: 242
Estimable Member
 

Ah.. let's try something else. I looked inside a different variables.php file to see for the categories... so add this instead.

$blocks["menu"]["content"] = array (
0 => 'home',
1 => 'catslink',
2 => 'series',
3 => 'browse',
4 => 'recent',
5 => 'search',
6 => 'tens',
7 => 'members'
);

Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 24/01/2008 1:40 pm
(@fikgirl)
Posts: 21
Eminent Member
Topic starter
 

Yay! That worked. Thanks so much! :mrgreen:


 
Posted : 24/01/2008 1:45 pm
(@jacynthe)
Posts: 242
Estimable Member
 

Glad I could help. πŸ™‚


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 24/01/2008 3:15 pm
Share: