Seems categories and characters are using 2 different methods to display so this mod is not translating well. In addition what I have completed so far is probably not the most efficient way to do it. Such as if I could edit the fields and the amount of tabs along with the regular data entry, then this would be full featured. As is tho, i can just copy paste the dataless template to every character in the sql file then update them. Example:
http://fanforge.net/browse.php?type=characters&charid=1103
<div class="tabber"> <div class="tabbertab"> <h2>Character Profile</h2> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tbody><tr> <td class="sectioncontent" rowspan="4" width="110" align="center" valign="top"> <div id="profile"><div id="bio"><div id="biocontent"><a href="" http://fanforge.net/user.php?action=manageimages"><im g" src="" http://fanforge.net/images/honoka.jpg "" alt="" /></a> </div></div></div> </td> <td class="sectionlinked"> <div id="profile"><div id="bio"><div id="biotitle"><strong>Name:</strong> Honoka Yukishiro</div></div></div> </td> <td class="sectionlinked"> <strong>Voice Actress</strong>: Yukana<br /></td> </tr> <tr> <td class="sectionlinked"> <strong>Alias</strong>: Cure White<br /></td> <td class="sectionlinked"> <strong>Cast in</strong>: <a href="" http://fanforge.net/browse.php?type=categories&id=153">Futar i" wa Pretty Cure</a>, <a href="" http://fanforge.net/browse.php?type=categories&id=154">Futar i" wa Pretty Cure: Max Heart</a><br /></td></tr> <tr> <td class="sectionlinked"> <div id="profile"> </div><strong>Gender</strong>: Female</td> <td class="sectionlinked"> <strong>Origin</strong>: Japan</td> </tr> <tr> <td colspan="2"> </td> </tr> </tbody></table> </div> <div class="tabbertab"> <h2>Biography</h2> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tbody><tr> <td class="sectioncontent" width="110" align="center" valign="top"> <div id="profile"><div id="bio"><div id="biocontent"><a href="" http://fanforge.net/user.php?action=manageimages"><im g" src="" http://fanforge.net/images/honoka.jpg "" alt="" /></a> </div></div></div> </td> <td class="sectioncontent" colspan="2" valign="top"> <div id="profile"><div id="bio"><div id="biocontent">Honoka is the quiet and reserved one, but she can be quite strict and domineering when the situation calls for it. Honoka is very poised and intelligent and enjoys reading. Her specialty is the science club, where she is looked up to by the others. Honoka hasn't had many friends, but the few she has seem to be really close to her. It has also been noted that she's relatively popular with the boys, though she seems to have little interest in them. She lives with her grandmother and their dog, Chuutaro. Her parents are art dealers and spend most of their time overseas.<br /></div></div></div> </td> </tr> </tbody></table> </div> </div>
Hmm TinyMCE made it look ugly. Ah well. Its one line so a Triple click will select it all. Then just copy paste and edit away. Tabbed Profile Mod is a prerequisite. I'm not sure if the javascript is in use here, but it works just fine with the other one working.
It's all hard coded so no variables as they won't be read. I just put it in the bio field using the TinyMCE html tool. I wasn't sure before, but it didn't strip anything important so it looks pretty good.
Question - How do I mod the category single listing so it displays like the Character single listing?
--
Updated: I added the profile template to the category.tpl files within a skin and it displays everything as it should. This way when Description is filled out in the MySQL it fills in the description variable. Further mods will be needed and I'll release it as a proper 2.0 mod then. Thanks.
I am rebuilding efiction! Join us on irc! #efiction at
I'm not quite sure how efiction works in this regard. Within the user profile template I am allowed to use {image} for the image there. This is not currently available to me for characters. I plan on adding entries to the sql database accordingly.
<div class="tabber">
<div class="tabbertab">
<h2>Character Profile</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" rowspan="4" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;"
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<div id="profile">
<div id="bio">
<div id="biotitle">
<strong>Name:</strong> {Character} <!-- ALREADY EXISTS IN MYSQL -->
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<strong>Played by</strong>: {actor}<br /> <!-- WHAT VOICE AND/OR REGULAR ACTOR PORTRAYS THEM -->
</td>
</tr>
<tr>
<td class="sectionlinked">
<strong>Alias</strong>: {alias}<br /> <!-- THIS WILL SHOW OTHER ROLE/S THE CHARACTER IS KNOWN AS -->
</td>
<td class="sectionlinked">
<strong>Cast in</strong>: {casts} <!-- THIS WILL LIST LINKS OF SERIES HE/SHE IS IN -->
</td>
</tr>
<tr>
<td class="sectionlinked">
<div id="profile">
</div>
<strong>Gender</strong>: {gender} <!-- MALE, FEMALE, OTHER -->
</td>
<td class="sectionlinked">
<strong>Origin</strong>: {origin} <!-- THIS GIVES CHARACTER'S ORIGIN -->
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</tbody>
</table>
</div>
<div class="tabbertab">
<h2>Biography</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;" <!-- IMAGE AGAIN -->
</div>
</div>
</div>
</td>
<td class="sectioncontent" colspan="2" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">{description}<br /> <!-- THIS ONE EXISTS ALREADY::WORKS-->
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
So, if I can add more fields to the form and subsequently more data to the mysql table. Then add more variables to the code so I can upload the above copy saved into a character.tpl or a variant for categories.tpl in a skin then I'll be in business.
I am rebuilding efiction! Join us on irc! #efiction at
This looks very interesting. Did you develop it any further or are you still using this version on your current archive with eFiction 3.5.1?
I'm using 3.5 at the moment and am thinking about looking into your idea for the character pages. I really like that a lot.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
Not sure I am able to do more than applying the tabber mod to character and categories. it becomes terribly slow and bulky if you have over 100 cats. I tried like 1000 and it was humorous to say the least. didn't crash at least.
I am rebuilding efiction! Join us on irc! #efiction at
Thanks for the info. Good thing I only have a small, rather private Archive and only a couple of categories, characters and visitors. π So I guess mine won't get too slow or make any other problems.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
you could just add the lins manually. if you add the tabber html code into the bio via mysql you will be on your way there
I reread w hat I posted, look slike wishful thinking, so as I said, you'll need to do much by hand, so no variables or .tpl files to help
I am rebuilding efiction! Join us on irc! #efiction at
I'm doing a lot by hand right now as I'm moving everything from my original site to a double-installation with joined authors table, rearranging categories and everything I have to edit a lot of stuff in the database π So that's not really a problem for me. I just want to finish moving all the data before adding new features and stuff π
Thanks a lot again. I really appreciate your answers.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
Well, not that I recommend this. call it a .1 alpha build.
I added characters.tpl to my skin folder. it's basically the code I have above for profiles with adjustments
I added
$tpl->assignInclude( "characters", "./$skindir/characters.tpl" ); //addition
to browse.php after
else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" );
$tpl->assignInclude( "header", "./$skindir/header.tpl" );
$tpl->assignInclude( "footer", "./$skindir/footer.tpl" );
Also
<!-- INCLUDE BLOCK : characters -->
After {output} to browse.tpl. I'm not sure that's the right location or method.
I post this because what I did did nothing at all. No errors, no output, nothing. So unless you have an inkling how to make it output, not sure you should bother with it just yet.
I am rebuilding efiction! Join us on irc! #efiction at
okay. assigning a template makes sense (so that works?)
But sorry if I'm just stupid or what ... The thing with the block won't do you any good, will it? The characters thingy is not a block it's a mod, right? for that include to work you'd have to initialize a block for characters. And I don't think you did that nor do I think that's what you actually want.
Just trying to sort out the information from the docs. Again: Sorry if I'm wrong.
Like I said before: I won't add this thing right now because I want to set everything up and fill in the data first, then get the site(s) online again and then I'll try adding some mods and such. As for this one: giving it a good thought, I really love the idea, but I want to have one skin without too many pictures and js and other stuff for people with older computer/browser or slower connections. So I think I leave it for now as this solution is not optional and can't be switched off for seperate skins if I'm not mistaken ...
doesn't mean I'm not going to play aorund with this, though π just not on my live site.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
Oh, no. If this works correctly, it'll only use whats available. So, you can have a different one for each skin or none. This is a mod, but it will use the skins as you mentuion. Yes, don't use it yet, too soon. I just want to get a dialogue going, thanks.
I am rebuilding efiction! Join us on irc! #efiction at
I'm always up for a dialogue, just can't help you too much, yet ... unfortunately π
Hmmm. I'm a little confused now, to be honest ... when you copypaste the whole information and everything (the tabber and such as you suggest in your first post) into the profile field for each character, it'll always be there, right? it's in the database so for the profile-page to display correctly you would need the tabber javascript and such ...
of course i understand, this is still in development and you're trying to improve it.
There is, btw., a field with "image" in the characters table. It's just not in use, yet. Just found that when I was studying the different tables. π
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
Ah you are quite right, if this alpha actually worked, then each character would have 2 profiles showing, but its the kind of success I was looking forward to. The sql information would need to be dropped as characters.tpl would act just like profile.tpl
Yes, image is there, but as you can see here http://fanforge.net/browse.php?type=characters&charid=1
Well, i'll do more tests
--
I'm not seeing in the sql any location of some of the blocks mentioned in the tpls i posted there. so it is said to be a block, but I'm not confident I need to add it to the sql to work.
--
Note, this is stil alpha, maybe .2 now. It won't do anything yet
Updated characters.tpl
<!-- INCLUDE BLOCK : header -->
<div id="chaprofile">
<!-- INCLUDE BLOCK : chaprofile -->
{adminoptions}
<div id="sort">{sort}</div>
</div>
<div id="tabs">
<!-- START BLOCK : paneltabs -->
<span {class}>{linkcount}</span>
<!-- END BLOCK : paneltabs -->
<div class="cleaner" style="clear: both;"> </div>
</div>
{output}
<!-- INCLUDE BLOCK : listings -->
<!-- INCLUDE BLOCK : footer -->
I'll need to use this code
if(file_exists("$skindir/characters.tpl")) $tpl = new TemplatePower( "$skindir/characters.tpl" );
but I don't know where. There is no uniformity between users, characters and categories design wise although I'd like there to be.
Also, I tried in browse.php
if(file_exists("$skindir/browse.tpl")) $tpl = new TemplatePower( "$skindir/browse.tpl" );
else $tpl = new TemplatePower("default_tpls/browse.tpl");
after
if(file_exists("$skindir/characters.tpl")) $tpl = new TemplatePower( "$skindir/characters.tpl" );//added
else $tpl = new TemplatePower("default_tpls/characters.tpl");//added
broke it, so I commented it out for later
Updated chaprofile.tpl
<!-- START BLOCK : chaprofile -->
<div class="tabber">
<div class="tabbertab">
<h2>Character Profile</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" rowspan="4" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;"
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<div id="profile">
<div id="bio">
<div id="biotitle">
<strong>Name:</strong> <br />
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<strong>Voice Act</strong>: <br />
</td>
</tr>
<tr>
<td class="sectionlinked">
<strong>Alias</strong>: <br />
</td>
<td class="sectionlinked">
<strong>Cast in</strong>: <a href="""></a>," <a href="""></a><br" />
</td>
</tr>
<tr>
<td class="sectionlinked">
<div id="profile">
</div>
<strong>Gender</strong>:
</td>
<td class="sectionlinked">
<strong>Origin</strong>: Japan<br />
</td>
</tr>
<tr>
<td colspan="2">?</td>
</tr>
</tbody>
</table>
</div>
<div class="tabbertab">
<h2>Biography</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;"
</div>
</div>
</div>
</td>
<td class="sectioncontent" colspan="2" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent"><br />
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- END BLOCK : chaprofile -->
I am rebuilding efiction! Join us on irc! #efiction at
An alternate method, but again it is not calling the variables. This works half way, so you can test it if you wish.
browse.tpl
<!-- INCLUDE BLOCK : header -->
{output}
<div class="tabber">
<div class="tabbertab">
<h2>Character Profile</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" rowspan="4" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;"
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<div id="profile">
<div id="bio">
<div id="biotitle">
<strong>Name:</strong> <br />
</div>
</div>
</div>
</td>
<td class="sectionlinked">
<strong>Voice Act</strong>: <br />
</td>
</tr>
<tr>
<td class="sectionlinked">
<strong>Alias</strong>: <br />
</td>
<td class="sectionlinked">
<strong>Cast in</strong>: <a href="""></a>," <a href="""></a><br" />
</td>
</tr>
<tr>
<td class="sectionlinked">
<div id="profile">
</div>
<strong>Gender</strong>:
</td>
<td class="sectionlinked">
<strong>Origin</strong>: Japan<br />
</td>
</tr>
<tr>
<td colspan="2">?</td>
</tr>
</tbody>
</table>
</div>
<div class="tabbertab">
<h2>Biography</h2>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="sectioncontent" width="110" align="center" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">
<a href="" http://fanforge.net/user.php?action=manageimages">{image}</a> ;"
</div>
</div>
</div>
</td>
<td class="sectioncontent" colspan="2" valign="top">
<div id="profile">
<div id="bio">
<div id="biocontent">{bio}<br />
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- START BLOCK : sortform -->
<div id="sortform">{sortbegin}{categorymenu} {charactermenu1} {charactermenu2} {pairingsmenu} {ratingmenu} {classmenu} {sortmenu} {sortend}</div>
<!-- END BLOCK : sortform -->
<!-- INCLUDE BLOCK : listings -->
<!-- INCLUDE BLOCK : footer -->
A note, I'm seeing fundamental differences between browse.tpl and profile.tpl, browse.tpl use {output} which displays the sql data it is assigned to display. If I can drop this method and instead use what profile.tpl uses, I'll be set. Where in the code should I look?
I am rebuilding efiction! Join us on irc! #efiction at
I edited profile.php in the user folder so character pages work the same way. I know I'll need to add more sql. Also submission in the categories.php page within browse. Still, I'd love a hand in this. It's coming along fairly well, but all i'm doing is reverse engineering. It is still alpha code, so testing will cause breaks. This is also using the tabbed profile mod.
<?php
// Build the character's profile information
if(!defined("_CHARSET")) exit( );
$tpl->newBlock("chaprofile");
$result2 = dbquery("SELECT * FROM "._CHARACTERTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_characters as ap ON ap.charid = "._CHARIDFIELD." WHERE "._CHARIDFIELD." = '$charid' LIMIT 1");
$charinfo = dbassoc($result2);
$charnameinfo = "";
if(!empty($favorites) && isMEMBER && $charinfo['charid'] != CHARID) {
$fav = dbquery("SELECT * FROM ".TABLEPREFIX."character_favorites WHERE uid = '".CHARID."' AND type = 'AU' AND item = '".$charinfo['charid']."'");
if(dbnumrows($fav) == 0) $favinfo .= " [<a href=""user.php?action=favch&uid=".CHARID."&add=".$charinfo['charid'"]."">"._ADDCHARACTER2FAVES."</a>]";
if(dbnumrows($fav) == 0) $favinfo .= " [<a href=""user.php?action=favch&add=".$charinfo['charid'"]."">"._ADDCHARACTER2FAVES."</a>]";
}
$tpl->assign("add2fav", $favinfo);
$tpl->assign("charname", $charinfo['charname']." ".$nameinfo);
$tpl->assign("alias", $charinfo['alias']." ".$charnameinfo);
$tpl->assign("gender", $charinfo['gender']." ".$charnameinfo);
$tpl->assign("voice", $charinfo['voice']." ".$charnameinfo);
if($charinfo['bio']) {
$bio = nl2br($charinfo['bio']);
$tpl->assign("bio", stripslashes($bio));
}
if($charinfo['image'])
$tpl->assign("image", "<img src=""".$charinfo['image'"]."" border="1" vspace="2"></a>");
else $tpl->assign("image", "<img src=""images/unlined_noimg.gif"" border="1" vspace=2"></a>");
if(!empty($dynamicfields)) $tpl->assign("charfields", $dynamicfields);
?>
The gain in having this mod are images, adding your favorite characters, more details on a given character for those not familiar with them.
Edit:Saw an error, userinfo should be charinfo
I am rebuilding efiction! Join us on irc! #efiction at
you're really working hard on this, aren't you? I'm trying to get my head around the whole php stuff a little at least before trying to mod away π Won't find much time today anyway. Will hopefully get to play around later on ... Wednesday or so. I hopefully will have sime time by then π
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
