 | [Solved] Using EM |  |
Posted: 05/27/2007 9:10 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 6:40 AM
|

|
|
|
|
 |
What do you do when a mod doesn't install properly?
Part of the mod installed but there was a FIND error. Do you finish the mod by hand or do you uninstall what's been done and start from scratch? This mod had SQL changes so I can't run it again  |
|
Last edited by Karen on 05/27/2007 2:55 PM; edited 1 time in total |
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Using EM |  |
Posted: 05/27/2007 9:34 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
I just use EM but should I come into something that can't be processed by EM I'll do it manually then remove the command(s) from the mod install file then re-upload it back to the server overwriting the install file that's all ready there. I just keep doing that until EM says it can process all of the editing/copying commands etc. When it can do them I then upload the files I edited manually overwriting the ones on the server that are already there. At this stage I'd then process the rest of the commands using EM. If it can't process the SQL queries etc I just continue then I'd manually insert/update the commands using IE.
You can use this site to convert MySQL to php http://www.phpbbstyles.com/sql.php once you have the file uploaded to your phpbb root folder on your server you could then goto http://www.babydreams.net/sql.php and that should update the SQL queries in your database. If that doesn’t work you can always use phpMyAdmin  |
|
Last edited by Chris Powell on 05/27/2007 9:51 AM; edited 1 time in total |
|
 |
 |
| Back to Top |
|
|
 | Re: Using EM |  |
Posted: 05/27/2007 9:48 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
| Karen wrote:
|
This mod had SQL changes so I can't run it again
|
You could just remove the SQL commands from the mod install file then re-upload it back onto your host. This way you could then carry on with the rest of the mod without the SQL commands from the mod install file being inserted into your database for the second time
You with me…?  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Using EM |  |
Posted: 05/27/2007 9:49 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 6:40 AM
|

|
|
|
|
 |
Ooh thanks for that link
That's sort of what I did. In the end I put back my original files and then took out the SQL instruction and edited the bit of code EM couldn't read and ran it again, it said it went through OK. I then added the SQL manually (I was assuming EM didn't do it originally) but the mod isn't there. Its the User_sets_posts_topics mod.
ETA - Ignore that last bit, its there in subSilver I didn't do the other template changes Such a dufus  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Using EM |  |
Posted: 05/27/2007 9:55 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
No problem
Do you have a link for that mod please and I’ll take a look heh |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Using EM |  |
Posted: 05/27/2007 9:59 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 6:40 AM
|

|
|
|
|
 |
Oh ignore me again - I just checked and they are there
Wonder why it worksd in subSIlver and not in the other templates
Sorry - its just missing from one of my templates, so at least that narrows it down
Its the one from here.
| Code:
|
##############################################################
## MOD Title: Users set Posts & Topics count
## MOD Author: cYbercOsmOnauT < > (Tekin B.) http://www.cybercosmonaut.de
## MOD Description: Users can set Posts/Topics shown per Page.
## MOD Version: 1.0.1
## Installation Level: Easy
## Installation Time: 23 Minutes
## Files To Edit: admin/admin_users.php
## includes/functions.php
## includes/usercp_avatar.php
## includes/usercp_register.php
## language/lang_english/lang_main.php
## templates/subSilver/admin/user_edit_body.tpl
## templates/subSilver/profile_add_body.tpl
## Included Files: n/a
## Generator: MOD eclipse
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Thanks for Selderaya for betatesting and sending me the errors :-)
##############################################################
## MOD History:
##
## 2005-08-07 - Version 1.0.0
## - Initial Release
##
## 2005-08-22 - Version 1.0.1
## - Changed some minor faults in the mod
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = ( !empty($HTTP_POST_VARS['postspp']) ) ? trim(strip_tags( $HTTP_POST_VARS['postspp'] ) ) : '';
$topicspp = ( !empty($HTTP_POST_VARS['topicspp']) ) ? trim(strip_tags( $HTTP_POST_VARS['topicspp'] ) ) : '';
#
#-----[ FIND ]------------------------------------------
#
$signature = htmlspecialchars(stripslashes($signature));
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = htmlspecialchars(stripslashes($postspp));
$topicspp = htmlspecialchars(stripslashes($topicspp));
#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql . $passwd_sql . "user_email =
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_allowsmile = $allowsmilies
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_postspp = '" . str_replace("\'", "''", $postspp) . "', user_topicspp = '" . str_replace("\'", "''", $topicspp) . "'
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $this_userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = htmlspecialchars($this_userdata['user_postspp']);
$topicspp = htmlspecialchars($this_userdata['user_topicspp']);
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="allowsmilies" value="' . $allowsmilies . '" />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="postspp" value="' . str_replace("\"", """, $postspp) . '" />';
$s_hidden_fields .= '<input type="hidden" name="topicspp" value="' . str_replace("\"", """, $topicspp) . '" />';
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTS_PER_PAGE' => $postspp,
'TOPICS_PER_PAGE' => $topicspp,
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_TOPICS_PER_PAGE' => $lang['Topics_per_page'],
'L_TOPICS_PER_PAGE_EXPLAIN' => $lang['Topics_per_page_explain'],
'L_POSTS_PER_PAGE' => $lang['Posts_per_page'],
'L_POSTS_PER_PAGE_EXPLAIN' => $lang['Posts_per_page_explain'],
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
if ( isset($userdata['user_timezone']) )
{
$board_config['board_timezone'] = $userdata['user_timezone'];
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( !empty($userdata['user_postspp']) )
{
$board_config['posts_per_page'] = $userdata['user_postspp'];
}
if ( !empty($userdata['user_topicspp']) )
{
$board_config['topics_per_page'] = $userdata['user_topicspp'];
}
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_avatar.php
#
#-----[ FIND ]------------------------------------------
#
function display_avatar_gallery(
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, &$allowsmilies
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$postspp, &$topicspp
#
#-----[ FIND ]------------------------------------------
#
$params = array('coppa'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, 'allowsmilies'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'postspp', 'topicspp'
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$strip_var_list = array
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, 'interests' => 'interests'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'postspp' => 'postspp', 'topicspp' => 'topicspp'
#
#-----[ FIND ]------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = stripslashes($postspp);
$topicspp = stripslashes($topicspp);
#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql . $passwd_sql .
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_allowsmile = $allowsmilies
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_postspp = '" . str_replace("\'", "''", $postspp) . "', user_topicspp = '" . str_replace("\'", "''", $topicspp) . "'
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_postspp, user_topicspp
#
#-----[ FIND ]------------------------------------------
#
VALUES ($user_id
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, $allowsmilies
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $postsspp) . "', '" . str_replace("\'", "''", $topicspp) . "'
#
#-----[ FIND ]------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = stripslashes($postspp);
$topicspp = stripslashes($topicspp);
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$postspp = $userdata['user_postspp'];
$topicspp = $userdata['user_topicspp'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery(
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, $allowsmilies
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $postspp, $topicspp
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => ( !$allowsmilies ) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTS_PER_PAGE' => $postspp,
'TOPICS_PER_PAGE' => $topicspp,
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_POSTS_PER_PAGE' => $lang['Posts_per_page'],
'L_POSTS_PER_PAGE_EXPLAIN' => $lang['Posts_per_page_explain'],
'L_TOPICS_PER_PAGE' => $lang['Topics_per_page'],
'L_TOPICS_PER_PAGE_EXPLAIN' => $lang['Topics_per_page_explain'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Timezone']
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Posts_per_page'] = 'Posts per Page';
$lang['Posts_per_page_explain'] = 'The amount of posts shown per page. Leave it empty for board default.';
$lang['Topics_per_page'] = 'Topics per Page';
$lang['Topics_per_page_explain'] = 'The amount of topics shown per page. Leave it empty for board default.';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}</span></td>
<td class="row2">
<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_POSTS_PER_PAGE}</span><br />
<span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
<td class="row2">
<input class="post" type="text" name="postspp" value="{POSTS_PER_PAGE}" maxlength="3" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TOPICS_PER_PAGE}</span><br />
<span class="gensmall">{L_TOPICS_PER_PAGE_EXPLAIN}</span></td>
<td class="row2">
<input class="post" type="text" name="topicspp" value="{TOPICS_PER_PAGE}" maxlength="3" />
</td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td>
<td class="row2">
<input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_POSTS_PER_PAGE}:</span><br />
<span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="postspp" style="width: 25px" value="{POSTS_PER_PAGE}" maxlength="3" class="post" />
</td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TOPICS_PER_PAGE}:</span><br />
<span class="gensmall">{L_TOPICS_PER_PAGE_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="topicspp" style="width: 25px" value="{TOPICS_PER_PAGE}" maxlength="3" class="post" />
</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
|
|
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Using EM |  |
Posted: 05/27/2007 10:12 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
The mod is written well. It's just that EM has trouble doing the IN-LINE FIND and IN-LINE AFTER, ADD commands half of the time, which is when you have to edit the files yourself.
If you want the mod to work with other templates then I guess you'd need to edit these files in your other templates folders
templates/???????/admin/user_edit_body.tpl
templates/???????/profile_add_body.tpl |
|
|
 |
 |
| Back to Top |
|
|
 | Re: Using EM |  |
Posted: 05/27/2007 10:23 AM |
|
|
|
|
|
| Citation |
| Posts |
1253 |
| Word Cnt. |
68,166 |
| BDay |
Nov 9 |
| Sign |
Scorpio |
| Sex |
 |
|
|
|
Joined: Jan 06, 2006
Local time: 6:40 AM
|

|
|
|
|
 |
*sigh* I went back and did those edits again and its still not showing in one of my templates
Maybe NR can see something I've missed  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Using EM |  |
Posted: 05/27/2007 10:28 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
Ok, well I had a go heh
Nightrider will figure it out though yeah  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Using EM |  |
Posted: 05/27/2007 10:33 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 7:40 AM
Location: Birmingham, UK.
|

|
|
|
|
 |
I've just checked and I actually already have this mod installed on my forum lol
| Quote:
|
Users set Posts & Topics count
1.0.1 Users can set Posts/Topics shown per Page.
---------------------------------------------------------------------- ----------
File: users_set_posts_topics.txt
Installed: 18 May 2007 04:32 pm
|
I'm pretty sure no help was needed from Nightrider when doing this mod
Not sure what's up with yours
Good luck with it!  |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|