Hey, I'm sorry if I put this in the wrong forum, but it kinda is a general question.
At the moment I'm trying to set up a fanfiction site in 2 different languages. English and German. Now obviously I wouldn't want users to have to register for each language individually (as most german Fafiction readers I know read english, too *lol*) so I set up two installations that share the author's table. this works great, members are registered on both sites.
Now. Settings and profile fields are in different tables, of course. The questions I have are:
If I re-install the second installation having it not only share the authors table but also the authorpfev table, would that work then, too? Both sites will be set up completely the same; same layouts and everything. So if a user changes the settings on Installation A for fanfics to be sorted alphabetically ... would that setting also work on Site B then?
I take it they have to log in on Site A and Site B individually, right? And I guess there's no way to change that (easily).
Second question concerning the additional profile fields; same thing here. I guess if I set up the second installation to use the table from the first installation this should work. BUT here is my language problem. If I define a profile field saying "Favorite Character" named 'favchar' it will also be displayed with "Favorite Character"; on the German installation, too. If I use the German version "Lieblingscharacter" English people would have German stuff on their profile ... not too nice.
So I thought there would be a possible workaround via the skin doing the following: changing "profile.tpl" by deleting the {authorfields} bit which makes all the additional activated fields show up and code it in instead by using <div id="label">Favorite Character</div> {favchar}
and adding all the fields by hand. So I can have it all in english on the english installation while the skin for the german installation would have the german names/labes in it. Not the most elegant version but it would work.
Now I only have one problem: changing profile.tpl will make this work when somone looks at someone else's profile. But can I also do a trick like this on the Change Bio bit so they also read the names of the fields in their language? Basically: Which template is used when a user clicks on the change bio link in their account? I thought it might be user.tpl but that looks a lot different *lol*
if this isn't possible at all users will have to edit their informations on both installations, but it would be neat as I know my users are really lazy when it comes to editing account settings and informations π
I hope you can actually follow my explanations *sigh* foreighn language and all. I'm happy to answer any question if that helps the cause. π
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
There's no option to share the authorprefs and info tables. You'd have to edit just about every file in the site.
Which template is used when a user clicks on the change bio link in their account? I thought it might be user.tpl but that looks a lot different *lol*
As far as I understand, that's not really controlled by an individual .tpl file. The content of what appears there is controlled by Admin > Panels. I think things like centering/not centering, tabling, bgcolor, that kind of thing, would be controlled by the skin's default.tpl. That said, you could probably create a new .tpl for it, but you'd have to modify user.php to tell it to use the .tpl, and I'm not 100% on how that would be done.
You'd probably have to add something in here, but user.php is so huge... I'm not sure how it's broken up or if it even makes sense to be here (since profile editing is the responsibility of the files in the 'user' folder, although each file in there is individual to the links clicked on "account info" link, hence why I think it's user.php that is the one you want).
Anyway, the lines in question (37-42 in user.php, v3.5):
//make a new TemplatePower object
if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
else $tpl = new TemplatePower("default_tpls/default.tpl");
if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" );
include("includes/pagesetup.php");
So regardless, you'd want to do something like that somewhere in a .php. Sorry that's not more helpful. You also have then to be able to define the variables for the tpls. Not sure how you want to go about that.
And now rereading your post, I'm not sure if you meant before or after they click 'edit bio'. What I was just talking about was before, although I think it would work for after well. The problem is that the content for the Edit Bio form (or what appears for yoursite.com/user.php?action=editbio) is defined by user/editbio.php starting around line 170. You could probably invent a new .tpl for this as well. You also have to actually define the variables as they'd be used in the .tpl file. That's easy enough with custom page links, but where they don't exist you have to do like so:
$tpl->assign( "output", $output );
$tpl->assign("adminlinks", $adminlinks);
$tpl->assign("chaptertitle", $stories['chaptertitle']);
$tpl->assign("chapternumber", $stories['inorder']);
And so on. Those are pulled from stories.php and the output one appears in pretty much every file that generates output.
I've never tried this so I'm not sure I'm doing a good job of explaining. :
@Tammy: Ah okay ... *lol* I just thought in theorie it would be lovely π Thanks for your reply, Tammy.
@Lyndsie: Aww. Thank you very much for the long reply and thinking about my problem this much. As I can't have them using the same tables, I don't really need to add another template. But I'll keep your explanations in Mind just in case I want to try and force some more teplates in anyway π
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
