Use Image to Indica...
 
Notifications
Clear all

Use Image to Indicate completed or not

6 Posts
3 Users
0 Reactions
2,518 Views
(@jacci)
Posts: 503
Honorable Member
Topic starter
 

Is it possible to use an image to denote if a story is completed or not? So when someone checks the completed box, a gif woudl come up, or if left unchecked an alternative image woudl display?

If possible, woudl it have to be a sitewide change, or could it be altered on a skin by skin basis? So that some just have the regular Completed: yes/no feild and some have the image instead?

thanks


why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/     
php: 5.2.5  msql: 5.0.45-community
efic version: 3.4.3           latest patches: yes
bridges: none              mods: challenges, displayword, beta-search

 
Posted : 01/04/2011 11:23 pm
(@michelle)
Posts: 106
Estimable Member
 

This existed as an easy mod for 1.1. The thread is here: https://efiction.org/forums/index.php?topic=646.0

Maybe that'll help you to get started.


 
Posted : 02/04/2011 8:43 am
(@tammy)
Posts: 2577
Member Moderator
 

You could edit includes/storyblock.php to use images instead of text. To be able use both images and text in different skins, add a new variable for the completed image.


 
Posted : 04/04/2011 11:51 am
(@jacci)
Posts: 503
Honorable Member
Topic starter
 

Thanks Michelle, will have a bit of a study of that mod.

I think i was already halfway to getting it, and I know about the variables addition (i am assuming it is the same as the featured/retired variables image)

just wasnt sure where i woudl have to edit it to make that variable work

thanks, going to give this a whirl


why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/     
php: 5.2.5  msql: 5.0.45-community
efic version: 3.4.3           latest patches: yes
bridges: none              mods: challenges, displayword, beta-search

 
Posted : 04/04/2011 11:03 pm
(@jacci)
Posts: 503
Honorable Member
Topic starter
 

I have found the relevant bit of code

	$tpl->assign("completed"   , ($stories['completed'] ? _YES : _NO) );

but i am unsure how to add the images code without breaking it. The changes from the version 1 to version 3 are signifciant.

tried using the featured as a model, but that was too different as well.


why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/     
php: 5.2.5  msql: 5.0.45-community
efic version: 3.4.3           latest patches: yes
bridges: none              mods: challenges, displayword, beta-search

 
Posted : 05/04/2011 9:37 pm
(@tammy)
Posts: 2577
Member Moderator
 

$tpl->assign("completedIMG"  , "<img src="'$skindir/images/".($stories['completed'"] ? "complete.jpg" : "incomplete.jpg")."' />");

Just an example.


 
Posted : 06/04/2011 11:52 am
Share: