How to Shut the Cat...
 
Notifications
Clear all

How to Shut the Categories on the Homepage and a Few Other Index Page Questions

13 Posts
5 Users
0 Reactions
2,358 Views
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

I was able to  figure out the links variable and stuff with all your help. Now I'd like to know how to get the categories off the homepage of the CSSZen and Zenlike skins. I'm sure it has something to do with the variables once again, but I don't know exactly what to do. What exactly should I delete or change? I figured it's the categories block part, but I don't know what to alter in that part. I'd also like to add a pole but since the other blocks don't work on those skins I doubt the poll block will too. Is there a way for me to add a poll on those skins?

One more thing. Does the newest stories show up on the home/index page? Or do I have to have the most recent link for that? I've noticed other fanfiction sites have them on their index page and that's where I would like mine. Will they show up there automatically once I open the site? Or is there special programming involved?

Dana


 
Posted : 02/07/2009 9:32 am
(@becca)
Posts: 553
Honorable Member
 

The .tpl file you need to look at is index.tpl
https://efiction.org/wiki/index.php5?title=Index.tpl

For categories you would remove the {categories_title} and {categories_content} and all of the surrounding html. To add a poll it would be the same thing {poll_title} and {poll_content}.

You can have the most recent block in your index.tpl and it would look something like this:

<div class="block">
<div class="title">{recent_title}</div>
<div class="content">{recent_content}</div>
</div>

If it's not there, you can add it using the same format that the other {*_title} tags use. There's no real special coding involved, there are tons of pre-made skins and it's just a matter of customizing them to your liking. Once you get the hang of the variables syntax it isn't too hard.


 
Posted : 02/07/2009 9:41 am
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

I was able to add the most recent and random stories to the index by copy and pasting. I copied the code from CSSZEN for most recent and put it in Elegence and Zenlike. Then did the same in Zenlike for random story. For the recent stories there was a lot more to it than was explained to me.  However,  don''t know the codes for featured fic or polling. They aren't on any of the skins nor are they even on the Elegence one. Do you know the codes I'll need? Also, do I have to manually add in the polling question each time in the index.php or will it just appear once I post the question in the blocks under admin?

Dana


 
Posted : 06/07/2009 6:23 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

You should not have to edit the index.php file for anything related to skinning. For poll block, the Blocks admin menu will have all the options you need to run a poll.

For any block, the format for the .tpl variables is as follows.

For title: {name_title}
For contents: {name_content}

Where 'name' equals the blocks name as designated in Admin > Blocks. Some blocks or modules may have more variables that can be used in skins. In that case, see their README files.


 
Posted : 06/07/2009 6:27 pm
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

Using the variable blocks only wasn't working for me on the CSSZen and Zenlike skins. Becca said to try the index.php and it worked. I will try what you said and if I have anymore problems I will let you know. 🙂


 
Posted : 06/07/2009 6:31 pm
(@babaca)
Posts: 722
Member Moderator
 

Dana,

Becca said to try and add it to the index.tpl (template) and not the index.php. Depending on who wrote the skin sometimes you would make these edits in the default.tpl. Skins written by Kali, she tends to put the information like that in the header.tpl. Not all skins are written alike which is why CSSZen's skin may act differently from Elegance or Zenlike (I believe all three skins where written by 3 different people).


******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3

 
Posted : 06/07/2009 6:54 pm
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

Oh don't worry! I misstyped! LOL I didn't do it in the php I did it in the tpl and it worked. 🙂 Heehee. Anyways, I tried the admin block in elegence and that has no variables but the poll still didn't work. So I know it has to go into the index.tpl. That's what has happened in the past. Then it will show up. But I still don't understand the codes for the poll. Like where it says content. How do I add the question in the variables part? And what EXACT code do I use in the tpl? I'm totally confused about this, but I'm trying.

Dana


 
Posted : 06/07/2009 7:07 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

All you need to put in the skins are {poll_title} and {poll_content}. How it works is that blocks/poll/poll.php tells the variable {poll_content} what to output. In this case, you determine what that is through the admin control panel. Go to Admin, then Blocks. Make sure that poll block in initialized and that it's set to either Active or Index Only (depending on in what skin file you put {poll_content} and {poll_title} - if it's in index.tpl, then Index Only, anything else, select Active). Then click the Options for poll block. The Options allow you to set the question and answers, and close polls, etc.


 
Posted : 06/07/2009 9:16 pm
(@tammy)
Posts: 2577
Member Moderator
 

Check your variables.php.  The poll block might be specifically turned off in there.


 
Posted : 07/07/2009 1:00 am
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

Okay, I got the polls to work. The only thing left I need to set up is the featured fic. How do I go about doing that one? Does anyone know? (Sorry I'm such a bother, but I don't know any of this stuff).

Dana


 
Posted : 07/07/2009 12:23 pm
(@babaca)
Posts: 722
Member Moderator
 

Same way as polls, if you are trying to add it to the index.tpl it's {featured_title} and {featured_content}.

Just make sure in Admin->Blocks you have Featured set to Index Only.


******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3

 
Posted : 07/07/2009 1:23 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Exactly. Remember, I said that the basic pattern for blocks will be {blockname_title} and {blockname_content}, where 'blockname' is the name of the block. So, {random_title}, {recent_content}, {news_content} and so on and so forth.


 
Posted : 07/07/2009 2:43 pm
(@danarose31382)
Posts: 60
Trusted Member
Topic starter
 

Thanks you giuys! I got everything up now! YAY!


 
Posted : 07/07/2009 6:08 pm
Share: