Notifications
Clear all

{menu_content} where is this variable declared?

11 Posts
4 Users
0 Reactions
4,948 Views
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

I'm trying to edit my skin, but I want to change the classes & whatnot (and basically phaff about) with the menu. Experiment, if you will.

However, I cannot find where in any of the code the {menu_content} variable is "declared" (sorry, I'm not sure if that's the right term). I mean, what makes up {menu_content} - that is, what do I have to change to alter the behaviour of {menu_content}?

I've searched through the whole efic installation, and the text "menu_content" doesn't appear anywhere, in any of the files, either as code or text (not sure what the difference is, but Dreamweaver seems to care).

Actually, now I'm looking, I can't find where a lot of the variables are declared. Obviously, I'm not looking at it the right way - can anyone give me some pointers?


 
Posted : 29/01/2014 12:35 am
 SJP
(@sjp)
Posts: 66
Trusted Member
 

I don't think I have {menu_content} in any of my skins. Is it in your header.tpl file? What skin is it?


 
Posted : 29/01/2014 5:22 pm
Nadia
(@nadia)
Posts: 255
Reputable Member
 

Have you checked the variables.php? It should be within your skins folder.
There you can make changes to your menu. If that is what you're looking for.

This is what's inside my variables.php for example


<?php
/*
Skin Name: Basement
Skin Download: http://efiction.de
Description: It's a simple and clear layout. ;)
Author: Nadia Volkrodt
Author E-Mail: nadia@artphilia.de
Author URL: http://artphilia.de
*/

/* FEATURED BLOCK
By default, the featured stories is off.*/
$blocks["featured"]["status"] =  '1';


/* INFO BLOCK
Info is set to display only on the home page.  I don't bother to style it.*/
$blocks["info"]["status"] = '1';


/* MENU BLOCK
The menu is set to display on all pages.
Additional styles include:
As an inline list. (style=2)
Links to home, recent, authors, categories,titles,series,search,top tens, browse by, help, contact us, and the login info. */
$blocks["menu"]["status"] = '1';
$blocks["menu"]["content"] = array (
  0 => 'home',
  1 => 'recent',
  2 => 'authors',
  3 => 'titles',
  4 => 'series',
  5 => 'browse',
  6 => 'tens',
  7 => 'contactus',
  8 => 'adminarea');
$blocks["menu"]["style"] = 0;


/* LOG-IN BLOCK
The login form is set to display on all pages, even though I only actually call it on the index.  It can safely be changed to just the index, but I did this to address a possible bug.
I currently have it set to display:
In long format (form) */
$blocks["login"]["status"] = '1';
$blocks["login"]["form"] = '1';


/* RANDOM STORIES BLOCK
Status is set to display on just the index page.*/
$blocks["random"]["status"] = '1';


/* RECENT STORIES BLOCK
By default, the recent stories block is off.*/
$blocks["recent"]["status"] = '1';


/* SKIN CHANGER
Status is set to display on all pages. */
$blocks["skinchange"]["status"] = '0';


/* NEWS BLOCK
Status is set to display on just the index page. */
$blocks["news"]["status"] = '1';


/* NEW STORY INDICATOR
Styled: Plain text surrounded with the superscript HTML tag with font-size set to extra small and italic.*/
$new = "<img class'noborder' src="'/images/new.gif'" alt='NEW!'>";
?>

My Hub TrekNation | World of X | Arda Fanfiction

 
Posted : 30/01/2014 6:59 am
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

Well, it seems {menu_content} is sort of declared in (of sorts) in one of the program files (hard coded). I just can't find the actual file(s) at the moment, but I think it's somewhere in blocks.

It's not in my variables.php

<?php
/*
Skin Name: pathfinder
Skin Download: http://sally.lunaescence.com/tag/zenlike
Description: A black, grey and red skin based on "elegance"

*/




/* CATEGORY BLOCK
Categories are to show only on the index.
I currently have it set to display:
The image, then the link, the story count in brackets, and then the description in a div tag. (template)
Three columns (columns)*/
$blocks["categories"]["status"] = '2';
$blocks["categories"]["template"] = "{image} {link} [{count}] <div>{description}</div>";
$blocks["categories"]["columns"] = '3';


/* FEATURED BLOCK
By default, the featured stories is off.*/
/*$blocks["featured"]["status"] =  '0'; */


/* INFO BLOCK
Info is set to display only on the home page.  I don't bother to style it.*/
$blocks["info"]["status"] = '2';


/* MENU BLOCK
The menu is set to display on all pages.
Additional styles include:
As an inline list. (style=2)
Links to home, recent, authors, categories,titles,series,search,top tens, browse by, help, contact us, and the login info. */
$blocks["menu"]["status"] = '1';
$blocks["menu"]["content"] = array (
 0 => 'home',
 1 => 'recent',
 2 => 'authors',
 3 => 'titles',
 4 => 'janewaylives_link',
 5 => 'search',
/*  6 => 'tens', */
 6 => 'accountinfo',
 7 => 'help',
 8 => 'contactus',
 9 => 'login',
 10 => 'logout',
 11 => 'adminarea'

);

/*  13 => 'catslink',


$blocks["menu"]["style"] = 0;


/* LOG-IN BLOCK
The login form is set to display on all pages, even though I only actually call it on the index.  It can safely be changed to just the index, but I did this to address a possible bug.
I currently have it set to display:
In long format (form) */
$blocks["login"]["status"] = '1';
$blocks["login"]["form"] = '1';


/* RANDOM STORIES BLOCK
Status is set to display on just the index page.*/
$blocks["random"]["status"] = '2';


/* RECENT STORIES BLOCK
By default, the recent stories block is off.*/
$blocks["recent"]["status"] = '1';


/* SKIN CHANGER
Status is set to display on all pages. */
$blocks["skinchange"]["status"] = '0';


/* NEWS BLOCK
Status is set to display on just the index page. */
$blocks["news"]["status"] = '2';


/* NEW STORY INDICATOR
Styled: Plain text surrounded with the superscript HTML tag with font-size set to extra small and italic.*/
$new = "<sup style='font-size:xx-small;font-style:italic'>New!</sup>";
?>

I'm still working through it all, trying to figure out where everything is. I'm trying to not edit any "program" files but it's quite challenging. Having a lot of fun though!

Oh and menu_content is called in the header.php of the skin. This is the default one:

<body>
<div id="{page_id}">
<div id="banner"><div id="sitename">{sitename}</div><div id="slogan">{slogan}</div><div id="skin">{skinchange_content}</div><div id="rss">{rss}</div>
</div>
{menu_content}
<div id="mainpage">


 
Posted : 30/01/2014 6:37 pm
Nadia
(@nadia)
Posts: 255
Reputable Member
 

I may have missunderstood what you are looking for. What do you want to change?


My Hub TrekNation | World of X | Arda Fanfiction

 
Posted : 01/02/2014 3:37 am
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

I'm trying to style up a menu on the site - it started that I just wanted a accessible/responsive skin. What I've discovered with {menu_content} and a whole bunch of other items, is that the styling and classes are hard coded into various parts of the code. So, there's no "one place" that things are called from. To add styles successfully, you have to edit the source files.

So, what that means is, to change certain items, even something as innocuous as the "New" text that appears on a new story, you have to change it in two places (at least that I've found so far).

The menu is the biggest example so far. Also, in various other places, when I've put div containers for the page setup, I've discovered that the code has to be repeated in several different places because each page (php file rather than tpl file) has its hardcoded stuff for setup. Class names are hard coded into the program files, so if I wanted to give something its own class, I'd have to find and edit a whole bunch of files to add one style

Actually, I've pretty much given up on the idea now. If I knew enough PHP I'd consider recoding the whole thing and using a framework so that each item has its own file (we used Fusebox where I worked) but sadly, I'm not a coder (I can read it but not write it).


 
Posted : 02/02/2014 6:06 pm
Nadia
(@nadia)
Posts: 255
Reputable Member
 

Ah, now I understand what you're trying to do.
I gave up on that too. That is why my hubby and I are creating our own script. I just don't like messing around with others. πŸ˜‰


My Hub TrekNation | World of X | Arda Fanfiction

 
Posted : 03/02/2014 2:35 am
(@lyndsie)
Posts: 1263
Member Moderator
 

I believe {menu_content} is created in blocks/menu/menu.php. That's how all the blocks work, as far as I recall. The same-name PHP file in block's individual folder contains the meat of the block. This is actually one of the smoother things about the current eFiction. Don't get me started on stories.php or the database. : (


 
Posted : 01/05/2014 1:36 am
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

Thanks Lyndsie.

We basically gave up on {menu_content}. I believe (but I can't be sure) that I tried the block method, but I think there were other bits hardcoded throughout and it just got too hard.

I've decided to go with one of Nadia's themes (she's done all the hard work for me).


 
Posted : 01/05/2014 1:46 am
(@lyndsie)
Posts: 1263
Member Moderator
 

I figured I was too late. It brought back some fun memories of playing with blocks, so I thought I'd share. There are some simpler ones that are fun to play with. For instance I once had two feature story blocks up on a site, and I created an RSS feed block.


 
Posted : 01/05/2014 1:48 am
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

No worries. I think it's valuable to have solutions documented in forum posts, rather than just a "I fixed it!" which doesn't really help anyone.

Hopefully, if someone tries to do the same thing we have, they'll find this thread helpful.


 
Posted : 01/05/2014 1:55 am
Share: