Notifications
Clear all

Problem modifying Site Info block [solved]

10 Posts
5 Users
0 Reactions
1,640 Views
(@ontophantoms)
Posts: 6
Active Member
Topic starter
 

I'm having trouble modifying the Site Info block to do what I want.  In particular, I think I am not using the right syntax, but I can't find a correct listing to model from.

I successfully followed the instructions here: https://efiction.org/forums/index.php?topic=7399.0 for using "narrative" with tinyMCE off, and entering into the box the following:


Members: {members}<br>
Authors: {authors}<br>
Stories: {stories}<br>
Reviews: {reviews}<br>
Challenges: {challenges}<br>
Wordcount: {wordcount}<br>
Newest Member: {newmember}

The first four work - the Info box shows up populated with the current number of members, authors, stories, and reviews.  However, beneath that, it just prints the code exactly as I typed it.  Instead of {challenges} finding the number of challenges, it just prints "{challenges}".  Same with {wordcount} and {newmember}.

Also, I'd like to put a link to a custom page into my Site Info block, but I can't figure out how to do that either.

My site is here: http://www.cheesecakearchive.info


 
Posted : 17/03/2010 2:13 am
(@lyndsie)
Posts: 1263
Member Moderator
 

Try changing the order/deleting one at a time, to maybe see if one of the variables is the culprit? I'd suspect {challenges}, particularly since that comes from a module.

You should be able to just put in a link to the custom page. I did so to make the "You have X stories in the submissions queue" into a link. Also, custom pages generate a custom page link would would be like {pagename} which I think should work in the site info block as well, though I've never tried it.


 
Posted : 17/03/2010 4:05 am
(@ontophantoms)
Posts: 6
Active Member
Topic starter
 

I tried deleting and reordering, and putting my link to the custom page back in when I'd done so.  But I still can't get the link or {challenges}, {wordcount}, or {newmember} to work.


 
Posted : 17/03/2010 4:21 am
(@hobert)
Posts: 61
Trusted Member
 

Well, for my Site Info block, I'm using {totalwords} instead of {wordcount}.

Hmm, try {newest} instead of {newmember} and {totalchallenges} instead of {challenges}.  Neither of these are something I use, but that looks like what is being set in the blocks/info/info.php and modules/challenges/stats.php files.


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 17/03/2010 11:36 am
(@ontophantoms)
Posts: 6
Active Member
Topic starter
 

Well, for my Site Info block, I'm using {totalwords} instead of {wordcount}.

Hmm, try {newest} instead of {newmember} and {totalchallenges} instead of {challenges}.  Neither of these are something I use, but that looks like what is being set in the blocks/info/info.php and modules/challenges/stats.php files.

Oh! Thank you, that worked!

I still can't get the link to my custom page to work.  According to the Page Links panel, the link to it ought to be {canon_link}, but it's just printing those characters in the Info box now.


 
Posted : 17/03/2010 5:09 pm
(@babaca)
Posts: 722
Member Moderator
 

I still can't get the link to my custom page to work.  According to the Page Links panel, the link to it ought to be {canon_link}, but it's just printing those characters in the Info box now.

Don't put the work _link in your link name.

All the page links I've added for my site I didn't add "link" to them. Try changing it to :

Name: canon
Text of Link: Canon
Link Access Key: [leave this blank]
Link URL: [type in the url where this canon page exists]
Link Target: New Window (if you want it to open on a separate page, or Same Window if you want the page to appear without going to a separate tab or window]
Link Access Level: All (unless you want this to only be seen by Members or Admins)


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

 
Posted : 17/03/2010 5:34 pm
(@ontophantoms)
Posts: 6
Active Member
Topic starter
 

Hmm... ok, I changed it on the Page Links page to "canon" and have it in my Site Info as {canon}, but it's still not working.


 
Posted : 17/03/2010 5:41 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

I'm not sure why that's not working, but I've actually put in a a href style link. I did it that way because I was surrounding some text. I believe this will only work, though, if you add <a> to the list of allowed tags, which will then also allow people to put links in their stories and such, which you may not want.


 
Posted : 17/03/2010 7:42 pm
(@ontophantoms)
Posts: 6
Active Member
Topic starter
 

Thank you, thank you!  That finally did it!


 
Posted : 17/03/2010 8:44 pm
(@tammy)
Posts: 2577
Member Moderator
 

You can't use a page link INSIDE the site info block text.  The site links are set through the .tpl.  The info block information is set using php and then sent to .tpl.


 
Posted : 19/03/2010 10:58 am
Share: