Some of my members have asked if there is a way to save personalized font size for the site? That way each member can decide what size they want their font to be and it be that way every time they read a story.
Would this be a module or something entirely? I know we have the "Change font size" for every story, but I think they are wanting something in preferences to save instead of having to do it every time?
Could this be done or has it been done and I'm not seeing it?
Thanks
http://www.twiwrite.net
Where Your Imagination Can Run Free
18+ TwiWrite Fan Fiction Archives.
efiction vs.3.5.2
SQL vs. 5.0.77
PHP vs. 5.2.2
Happily soaking up any and all php, tpl, and html knowledge I can.
You would have to develop your own mod for this.
In other words, it will not happen, since I have no idea how to do this. lol Thanks anyway though. I'll email the peeps on the site and let them know.
http://www.twiwrite.net
Where Your Imagination Can Run Free
18+ TwiWrite Fan Fiction Archives.
efiction vs.3.5.2
SQL vs. 5.0.77
PHP vs. 5.2.2
Happily soaking up any and all php, tpl, and html knowledge I can.
Hi,
if someone still need it, it is easy to code.
Change viewstory.php
find this:
$current = "viewstory";
include ("header.php");
if(isset($_GET['action'])) $action = $_GET['action'];
else $action = false;
if(isset($_GET['textsize']) && isNumber($_GET['textsize'])) $textsize = $_GET['textsize'];
else $textsize = 0;
if(empty($chapter)) $chapter = isset($_GET['chapter']) && isNumber($_GET['chapter']) ? $_GET['chapter'] : false;
change to:
$current = "viewstory";
include ("header.php");
if(isset($_GET['action'])) $action = $_GET['action'];
else $action = false;
if(isset($_GET['textsize']) && isNumber($_GET['textsize'])) {
$textsize = $_GET['textsize'];
if (isMEMBER) {
dbquery("UPDATE ".TABLEPREFIX."fanfiction_authors SET `textsize` = '".$textsize."' WHERE `uid` = '".USERUID."'");
}
}
else {
if (isMEMBER) {
$textsize_req = dbquery("SELECT `textsize` FROM ".TABLEPREFIX."fanfiction_authors WHERE `uid` = '".USERUID."' LIMIT 1");
$textsize_req2 = dbassoc($textsize_req);
$textsize = $textsize_req2['textsize'];
} else {
$textsize = 0;
}
}
if(empty($chapter)) $chapter = isset($_GET['chapter']) && isNumber($_GET['chapter']) ? $_GET['chapter'] : false;
And add a new field in fanfiction_authors table:
ALTER TABLE `fanfiction_authors` ADD `textsize` TINYINT( 1 ) NOT NULL DEFAULT '0';
Greetings,
Grimmbart
