Need help with a phpBB2 MOD

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 2:29 am

Hello there, name's Simon. :)

I am here to request your help with a phpBB2 MOD. I am currently working on a forum for my school's Languages program. I wish to add a MOD that would allow users to select the languages they are currently learning. Small flags corresponding to the selected languages would then appear in the profile and the posts. I tried doing this on my own but it's complete gibberish to me.

In other words, I am looking for something similar to the existing Country Flags MOD, but with the possibility to select several elements since we're all taking more than one language. I don't think the MOD needs a lot of modifications to meet my needs.

Here's an example of what it should look like, ideally. Anything similar will be fine.

Thanks a lot for your help, I really appreciate it.
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 4:38 am

You asked what the security benefits of phpBB3 were - quite simply, phpBB3 is being actively developed. If anything comes up (which hopefully there is nothing, phpBB3 has undergone very strict security tests including an audit by one of the most trusted security experts on the internet Stefen Esser) then it will be hit on the head quickly. As phpBB2 is no longer being developed, it may not get the same treatment if any new problems come up. So at least consider upgrading to phpBB3, if you only have a small forum then it shouldn't take too long.

On to your phpBB2 question, I need you to do this for me, post the contents of templates/{WHATEVER STYLE YOU USE}/profile_add_body.tpl (in this topic, in code tags)

Also, in the phpbb_users create a new column called user_flagslang it needs to be a VARCHAR set to 100 characters in length. The query to run is (providing your table is called phpbb_users - if you use a different table prefix, adjust the query accordingly) below. If you don't know how to use phpMyAdmin, read this: http://www.phpbb.com/community/viewtopi ... 0&t=588697
Code: Select all
ALTER TABLE phpbb_users ADD user_flagslang VARCHAR(100);
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 5:09 am

Hi battye, I successfully added the column to the table called lang_users. :)

Here is the content of the file, I am using FIsubice :
Code: Select all
<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">
<table width="100%" cellspacing="2" cellpadding="3" border="0">
<tr>
   <td class="maintitle">{L_PROFILE_INFO}</td>
</tr>
<tr>
<td class="nav"><a href="{U_INDEX}">{L_INDEX}</a> &raquo; {L_PROFILE_INFO}</td>
</tr>
</table>
{ERROR_BOX}
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="2">{L_REGISTRATION_INFO}</th>
</tr>
<tr>
<td height="22" colspan="2" class="row2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
</tr>
<!-- BEGIN switch_namechange_disallowed -->
<tr>
<td class="row1" width="38%"><span class="explaintitle">{L_USERNAME}:</span> *</td>
<td width="62%" class="row2"><input type="hidden" name="username" value="{USERNAME}" />
<span class="name">{USERNAME}</span></td>
</tr>
<!-- END switch_namechange_disallowed -->
<!-- BEGIN switch_namechange_allowed -->
<tr>
<td class="row1" width="38%"><span class="explaintitle">{L_USERNAME}:</span> *</td>
<td class="row2" width="62%">
<input type="text" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" />
</td>
</tr>
<!-- END switch_namechange_allowed -->
<tr>
<td class="row1"><span class="explaintitle">{L_EMAIL_ADDRESS}:</span> *</td>
<td class="row2">
<input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" />
</td>
</tr>
<!-- BEGIN switch_edit_profile -->
<tr>
<td class="row1"><span class="explaintitle">{L_CURRENT_PASSWORD}:</span> *<br />
<span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="cur_password" size="25" maxlength="32" value="{CUR_PASSWORD}" />
</td>
</tr>
<!-- END switch_edit_profile -->
<tr>
<td class="row1"><span class="explaintitle">{L_NEW_PASSWORD}:</span> *<br />
<span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="32" value="{NEW_PASSWORD}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_CONFIRM_PASSWORD}:</span> * <br />
<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="32" value="{PASSWORD_CONFIRM}" />
</td>
</tr>
<tr>
<td class="cat" colspan="2">&nbsp;</td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th colspan="2">{L_PROFILE_INFO}</th>
</tr>
<tr>
<td height="22" colspan="2" class="row2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
<tr>
<td class="row1" width="38%"><span class="explaintitle">{L_ICQ_NUMBER}:</span></td>
<td class="row2" width="62%">
<input type="text" name="icq" class="post" style="width: 100px"  size="10" maxlength="15" value="{ICQ}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_AIM}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px"  name="aim" size="20" maxlength="255" value="{AIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_MESSENGER}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px"  name="msn" size="20" maxlength="255" value="{MSN}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_YAHOO}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 150px"  name="yim" size="20" maxlength="255" value="{YIM}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_LOCATION}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="location" size="25" maxlength="100" value="{LOCATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_OCCUPATION}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="occupation" size="25" maxlength="100" value="{OCCUPATION}" />
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
   <!-- BEGIN switch_custom_title -->
   <tr>
     <td class="row1"><span class="gen">{L_CUSTOM_TITLE}:</span><br /><span class="gensmall">{L_CUSTOM_TITLE_EXPLAIN}</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="custom_title" size="45" maxlength="{CUSTOM_TITLE_MAXLENGTH}" value="{CUSTOM_TITLE}" />
     </td>
   </tr>
   <!-- END switch_custom_title -->
<tr>
<td class="row1"><span class="explaintitle">{L_SIGNATURE}:</span><br />
<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
<br />
{HTML_STATUS}<br />
{BBCODE_STATUS}<br />
{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
</td>
</tr>
<tr>
<td class="cat" colspan="2">&nbsp;</td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th colspan="2">{L_PREFERENCES}</th>
</tr>
<tr>
<td class="row1" width="38%"><span class="explaintitle">{L_PUBLIC_VIEW_EMAIL}:</span></td>
<td class="row2" width="62%">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_HIDE_USER}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="hideonline" value="1" {HIDE_USER_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="hideonline" value="0" {HIDE_USER_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_NOTIFY_ON_REPLY}:</span><br />
<span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_NOTIFY_ON_PRIVMSG}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_POPUP_ON_PRIVMSG}:</span><br />
<span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_ALWAYS_ALLOW_BBCODE}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_ALWAYS_ALLOW_HTML}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
<td class="row2">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />&nbsp;</td>
<td>{L_YES}&nbsp;&nbsp;</td>
<td><input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />&nbsp;</td>
<td>{L_NO}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_BOARD_LANGUAGE}:</span></td>
<td class="row2">{LANGUAGE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_BOARD_STYLE}:</span></td>
<td class="row2">{STYLE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_TIMEZONE}:</span></td>
<td class="row2">{TIMEZONE_SELECT}</td>
</tr>
<tr>
<td class="row1"><span class="explaintitle">{L_DATE_FORMAT}:</span><br />
<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
</td>
</tr>
<!-- BEGIN switch_avatar_block -->
<tr>
<td class="cat" colspan="2">&nbsp;</td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th colspan="2">{L_AVATAR_PANEL}</th>
</tr>
<tr>
<td class="row1" colspan="2">
<table width="70%" cellspacing="2" cellpadding="0" border="0" align="center">
<tr>
<td width="65%" class="gensmall">{L_AVATAR_EXPLAIN}</td>
<td align="center" class="gensmall">{L_CURRENT_IMAGE}<br />
{AVATAR}<br />
<input type="checkbox" name="avatardel" />
&nbsp;{L_DELETE_AVATAR}</td>
</tr>
</table>
</td>
</tr>
<!-- BEGIN switch_avatar_local_upload -->
<tr>
<td class="row1"><span class="explaintitle">{L_UPLOAD_AVATAR_FILE}:</span></td>
<td class="row2">
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
<input type="file" name="avatar" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_local_upload -->
<!-- BEGIN switch_avatar_remote_upload -->
<tr>
<td class="row1"><span class="explaintitle">{L_UPLOAD_AVATAR_URL}</span>:<br />
<span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="avatarurl" size="40" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_remote_upload -->
<!-- BEGIN switch_avatar_remote_link -->
<tr>
<td class="row1"><span class="explaintitle">{L_LINK_REMOTE_AVATAR}:</span><br />
<span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="avatarremoteurl" size="40" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_remote_link -->
<!-- BEGIN switch_avatar_local_gallery -->
<tr>
<td class="row1"><span class="explaintitle">{L_AVATAR_GALLERY}:</span></td>
<td class="row2">
<input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="button" />
</td>
</tr>
<!-- END switch_avatar_local_gallery -->
<!-- END switch_avatar_block -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp;
<input type="reset" value="{L_RESET}" name="reset" class="button" />
</td>
</tr>
</table>
<table width="100%" cellspacing="2" cellpadding="3" border="0">
<tr>
<td class="nav"><a href="{U_INDEX}">{L_INDEX}</a> &raquo; {L_PROFILE_INFO}</td>
</tr>
</table>
</form>


How long would it take to write a phpBB3 version of the same mod ? If it doesn't take too long, I would like to have one so that I can upgrade my forum to phpBB3 if needed. I would very likely use the default theme.

Oh and before I forget, languages are Spanish, Italian, German, Greek, Hebrew and Chinese. Thanks a lot.
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 5:29 am

Okay, could you please post the image addresses of the five flags that you want to use.
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 5:32 am

Code: Select all
http://centerian.free.fr/langdawson/images/languages/cn.png
http://centerian.free.fr/langdawson/images/languages/de.png
http://centerian.free.fr/langdawson/images/languages/es.png
http://centerian.free.fr/langdawson/images/languages/gr.png
http://centerian.free.fr/langdawson/images/languages/il.png
http://centerian.free.fr/langdawson/images/languages/it.png

Edit : Gonna call it a night... it's 0:47am over here. Good night, thanks again for the help.
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 5:50 am

The way it will be done is by users typing the languages they speak separated by commas (ie. cn,it,il)

I haven't tested it, so I have no way of knowing if it works. So you will need to try it and let me know. The user goes into the user control panel, adds the languages (as mentioned in the line above), submits... then look at a viewtopic page and see if the flags appear.

In the profile_add_body.tpl file, FIND:
Code: Select all
<tr>
<td class="row1"><span class="explaintitle">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>


AFTER ADD:
Code: Select all
<tr>
<td class="row1"><span class="explaintitle">{L_USERFLAGS}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px"  name="flagslang" size="35" maxlength="150" value="{USERFLAGS}" />
</td>
</tr>


OPEN includes/usercp_register.php (around line 511)

FIND
Code: Select all
user_interests = '" . str_replace("\'", "''", $interests) . "',


AFTER ADD
Code: Select all
user_flagslang = '" . str_replace("\'", "''", $HTTP_POST_VARS['flagslang']) . "',


FIND (around line 1038)

Code: Select all
      'OCCUPATION' => $occupation,

AFTER ADD

Code: Select all
      'USERFLAGS' => $userdata['user_flagslang'],


FIND (around line 1086)
Code: Select all
      'L_OCCUPATION' => $lang['Occupation'],


AFTER ADD
Code: Select all
      'L_USERFLAGS' => $lang['Userflags'],


OPEN language/lang_english/lang_main.php

FIND
Code: Select all
//
// That's all, Folks!
// -------------------------------------------------


BEFORE ADD
Code: Select all
$lang['Userflags'] = 'Enter the languages you speak, separating each language by commas. These are the abbreviations you need to use: (Chinese: cn, German: de, Spanish: es, Greek: gr, Hebrew: il, Italian: it)';



OPEN viewtopic.php

FIND
Code: Select all
   $poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';


AFTER ADD
Code: Select all
   $poster_userflags = ( $postrow[$i]['user_flagslang'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? str_replace(array('cn', 'de', 'es', 'gr', 'il', 'it', ','), array('<img src="http://centerian.free.fr/langdawson/images/languages/cn.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/de.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/es.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/gr.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/il.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/it.png" />', ''), $postrow[$i]['user_flagslang']) : '';


FIND (around line 1166)
Code: Select all
      'POSTER_FROM' => $poster_from,


AFTER ADD
Code: Select all
      'POSTER_USERFLAGS' => $poster_userflags,


OPEN templates/FISubice/viewtopic_body.html

FIND

Code: Select all
{postrow.POSTER_FROM}


AFTER ADD

Code: Select all
<br /><br />{postrow.POSTER_USERFLAGS}


Done.
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 3:41 pm

Thanks, I will install it and tell you how it works.

Edit : doesn't seem to work, I am currently trying to figure out if I missed something.
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 4:04 pm

What doesn't work? Nothing appears at all, you get errors, one thing works but another doesn't... :?:
If you explain what is not working I will be able to narrow down the problem.
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 4:08 pm

First I got an error saying a ";" was missing, but that was my mistake when I edited viewtopic.php

At first it looks fine, I can go into my UCP and write down the abbreviations for the languages I am taking, but nothing appears in topics.

I have altered the files previously when I installed the Custom Title MOD, could that be the cause ? :o
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 4:13 pm

Before we look at the problem in viewtopic, are you able to enter the abbreviations correctly?

And if you leave the page, and return to the UCP... are the abbreviations still there? If they are still there it means that the database is storing the values (it is important that I know this).
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 4:16 pm

Yes, the database is storing them. I tried entering the abbreviations with and without a space after the comma, didn't work either.
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 4:18 pm

You definitely did the last step of editing templates/FISubice/viewtopic_body.html?

Can you please post a link to any topic on your forum?
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 4:21 pm

Wait, is it viewtopic_body.tpl or html ?! :shock:

Code: Select all
http://centerian.free.fr/langdawson/viewtopic.php?t=4
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Re: Need help with a phpBB2 MOD

Postby battye » Tue Jan 19, 2010 4:23 pm

Sorry, I meant viewtopic_body.tpl (I've gotten used to saying .html as that is what it is called in phpBB3).

In viewtopic.php, FIND:

Code: Select all
  $poster_userflags = ( $postrow[$i]['user_flagslang'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? str_replace(array('cn', 'de', 'es', 'gr', 'il', 'it', ','), array('<img src="http://centerian.free.fr/langdawson/images/languages/cn.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/de.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/es.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/gr.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/il.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/it.png" />', ''), $postrow[$i]['user_flagslang']) : '';


REPLACE WITH

Code: Select all
  $poster_userflags = $postrow[$i]['user_flagslang'];


Then save and re-upload, tell me if that makes any difference.
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: Need help with a phpBB2 MOD

Postby thesims » Tue Jan 19, 2010 4:29 pm

I'm afraid it did not work. Do you want access to the ftp ?
User avatar
thesims
Greenhorn
Greenhorn
 
Posts: 21
Joined: Tue Jan 19, 2010 2:02 am

Next

Return to Web Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron