[Tutorial] How to install a MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
flash4203
Registered User
Posts: 57
Joined: Wed Sep 03, 2003 10:25 pm
Location: Suffolk
Contact:

Post by flash4203 »

--------------------------------------------------------------------------------

flash4203 wrote:
ok i know i am new at this i want to know what this means
Code:

#
#-----[ SQL ]------------------------------------------
#
# See schemas directory for databases other than mysql
#
CREATE TABLE phpbb_newsfeeds (
feed_id smallint(5) unsigned NOT NULL auto_increment,
forum_id smallint(5) unsigned NOT NULL default '0',
user_id mediumint(8) NOT NULL default '0',
news_url varchar(255) NOT NULL default '',
news_name varchar(60) default NULL,
news_limit smallint(5) unsigned NOT NULL default '0',
news_active tinyint(1) unsigned NOT NULL default '1',
include_channel tinyint(1) unsigned NOT NULL default '1',
include_image tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (feed_id),
KEY forum_id (forum_id)
);

This requires you to be able to modify your database. Have a read of these - [Tutorial] How to use phpMyadmin & [Tutorial] How to install a MOD.

flash4203 wrote:
also what is the Quote:
schemas
folder for and where does it go?

It doesn't need to go anywhere. It contains sql files which should be used instead of the sql above, if you do not use mysql as your database.


flash4203 wrote:
also i get this in my admin panel when on Input Newsfeeds

This will be because you have not modified your database.
_________________
:: netclectic mods
:: ex-smokers community

Happy MODding: MODs DB :: MOD Template :: MOD Tutorial :: MOD Knowledgebase
Is what i was told
flash4203
========
Cheep subdomains Perfict for php forums, have your own database and much more,

Only £20 a year
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
User avatar
flash4203
Registered User
Posts: 57
Joined: Wed Sep 03, 2003 10:25 pm
Location: Suffolk
Contact:

Post by flash4203 »

Will it tell me how to do that SQL part?
flash4203
========
Cheep subdomains Perfict for php forums, have your own database and much more,

Only £20 a year
User avatar
flash4203
Registered User
Posts: 57
Joined: Wed Sep 03, 2003 10:25 pm
Location: Suffolk
Contact:

Post by flash4203 »

Where is phpMyAdmin download?
flash4203
========
Cheep subdomains Perfict for php forums, have your own database and much more,

Only £20 a year
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
User avatar
flash4203
Registered User
Posts: 57
Joined: Wed Sep 03, 2003 10:25 pm
Location: Suffolk
Contact:

Post by flash4203 »

oh thats ok i cant follow the install cos i not know what
3.Open the file config.inc.php3 in your favorite editor and change the values for host, user, password and authentication mode to fit your environment. Here, "host" means the MySQL server. Also insert the correct value for $cfg['PmaAbsoluteUri']. Have a look at Configuration section for an explanation of all values.
that part means
flash4203
========
Cheep subdomains Perfict for php forums, have your own database and much more,

Only £20 a year
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

sorry, this topic is not for support phpmyadmin :wink:
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
SuperGogeta
I've Been Banned!
Posts: 244
Joined: Thu Aug 07, 2003 12:42 am

Post by SuperGogeta »

Thanx alot dude.

Now I can install my shop.

Thank you!
SuperGogeta
I've Been Banned!
Posts: 244
Joined: Thu Aug 07, 2003 12:42 am

Only ONE problem whily editing files...

Post by SuperGogeta »

You see...{postrow..POINTS} does not exist. As in the Install manuel, It has:
/***************************************************************************
* upgrade.txt
* -------------------
* Version : 2.6.0
* released : Tuesday, August 19th, 2003
* forums : http://forums.knightsofchaos.com
* email : [email protected]
*
* requires : 2.0.0+ phpbb
* points mod
* OR cash mod version 2.x
* files to edit : /includes/auth.php
* : /index.php
* : /includes/usercp_viewprofile.php
* : /viewtopic.php
* : /templates/*/viewtopic_body.tpl
* : /includes/page_header.php
* : /templates/*/overall_header.tpl
* difficulty : medium
* time : 20-25minutes
*
***************************************************************************/

/***************************************************************************
*
* copyright (C) 2002/2003 IcE-RaiN/Zarath
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* http://www.gnu.org/copyleft/gpl.html
*
***************************************************************************/

/***************************************************************************
* Installation
*
* 1. Create folder shop
*
* 2. Upload files
* /shop_install.php
* /shop.php
* /shop_bs.php
* /shop_effects.php
* /shop_actions.php
* /shop_inventory.php
* /admin/admin_shop.php
* /templates/*/shop_body.tpl
* /templates/*/shop_inventory_body.tpl
* /templates/*/admin/shop_config_body.tpl
* /shop_install.php
* /shop/images/icon_store_rpg.gif
*
* 2. Run shop_install.php then delete it.
*
* 3. Execute Steps Below
*
* 4. Read the FAQ!
***************************************************************************/


------[OPEN]------
/viewtopic.php

------[FIND]------
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_level, u.user_id,

------[ADD, AFTER]------
u.user_items, u.user_privs, u.user_effects, u.user_custitle,

------[FIND]------
//
// Note! The order used for parsing the message _is_ important, moving things around could break any
// output
//


------[ADD, BEFORE]------
if ($board_config['viewtopic'] == "images")
{
$itempurge = str_replace("Þ", "", $postrow[$i]['user_items']);
$itemarray = explode('ß',$itempurge);
$itemcount = count ($itemarray);
$user_items = "<br>";
for ($xe = 0;$xe < $itemcount;$xe++)
{
if ($itemarray[$xe] != NULL)
{
if ($board_config['viewtopiclimit'] < $xe) { $user_items .= ' <a href="'.append_sid("shop.".$phpEx."?action=inventory&searchid=".$postrow[$i]['user_id']).'" title="'.$postrow[$i]['username'].'\'sInventory">more...</a>'; break; }
if (file_exists("shop/images/".$itemarray[$xe].".jpg"))
{
$user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.jpg" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">';
}
elseif (file_exists("shop/images/".$itemarray[$xe].".gif"))
{
$user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.gif" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">';
}
}
}
}
$usernameurl = append_sid("shop.".$phpEx."?action=inventory&searchid=".$postrow[$i]['user_id']);

$usereffects = explode("ß", $postrow[$i]['user_effects']);
$userprivs = explode("ß", $postrow[$i]['user_privs']);
$usercustitle = explode("ß", $postrow[$i]['user_custitle']);
$userbs = array();
$usercount = count($userprivs);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
$usercount = count($usereffects);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
$usercount = count($usercustitle);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
$shoparray = explode("ß", $board_config['specialshop']);
$shoparraycount = count ($shoparray);
$shopstatarray = array();
for ($x = 0; $x < $shoparraycount; $x++)
{
$temparray = explode("Þ", $shoparray[$x]);
$shopstatarray[] = $temparray[0];
$shopstatarray[] = $temparray[1];
}
if (($userbs[10] == on) && ($shopstatarray[12] == on)) { $poster = '<font color="'.$userbs[11].'">'.$poster.'</font>'; }
if ((($userbs[12] == on) && ($shopstatarray[14] == on)) || (($userbs[14] == on) && ($shopstataray[16] = on))) {
$nameeffects = "<span style=\"width:100";
if (($userbs[12] == on) && ($shopstatarray[14] == on)) { $nameeffects .= "; filter:shadow(color=#".$userbs[13].", strength=5)"; }
if (($userbs[14] == on) && ($shopstatarray[16] == on)) { $nameeffects .= "; filter:glow(color=#".$userbs[15].", strength=5)"; }
$nameeffects .= '">'.$poster.'</span>';
$poster = $nameeffects;
}
if ((($userbs[24] == on) && ($shopstatarray[24] == on)) || (($userbs[20] == on) && ($shopstatarray[22] == on)) || (($userbs[22] == on) && ($shopstataray[20] = on)) || (($userbs[18] == on) && ($shopstatarray[18] == on))) {
$titleeffects = '<span style="height:10';
if (($userbs[22] == on) && ($shopstatarray[20] == on)) { $titleeffects .= "; filter:shadow(color=#".$userbs[23].", strength=5)"; }
if (($userbs[20] == on) && ($shopstatarray[22] == on)) { $titleeffects .= "; filter:glow(color=#".$userbs[21].", strength=5)"; }
if (($userbs[24] == on) && ($shopstatarray[24] == on)) { $poster_rank = $userbs[25]; }
if (($userbs[18] == on) && ($shopstatarray[18] == on)) { $poster_rank = '<font color="'.$userbs[19].'">'.$poster_rank.'</font>'; }
$titleeffects .= '">'.$poster_rank.'</span>';
$poster_rank = $titleeffects;
}
if (($shopstatarray[6] == on) && ($userbs[2] != on) && ($poster_rank != "Site Admin")) { $poster_avatar = ""; }
if (($shopstatarray[8] == on) && ($userbs[4] != on) && ($poster_rank != "Site Admin")) { $user_sig = ""; }
if (($shopstatarray[10] == on) && ($userbs[6] != on) && ($poster_rank != "Site Admin")) { $poster_rank = "None"; $rank_image = ""; }

------[FIND]------
'DELETE_IMG' => $delpost_img,
'DELETE' => $delpost,

------[ADD, AFTER]------
'ITEMSNAME' => $usernameurl,
'ITEMS' => $user_items,


------[OPEN]------
/templates/*/viewtopic_body.tpl

------[FIND]------
{postrow.POINTS}

------[ADD, AFTER]------
<br /><a href="{postrow.ITEMSNAME}">Items</a>{postrow.ITEMS}


------[OPEN]------
/includes/page_header.php

------[FIND]------
'PAGE_TITLE' => $page_title,

------[ADD, AFTER]------
'SHOP' => '<img src="shop/images/icon_store_rpg.gif" border="0">Shop',

------[FIND]------
'U_FAQ' => append_sid('faq.'.$phpEx),

------[ADD, AFTER]------
'U_SHOP' => append_sid('shop.'.$phpEx),

------[OPEN]------
/template/*/overall_header.tpl

------[FIND]------
<a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT}</a>

------[ADD, BEFORE]------
<a href="{U_SHOP}" class="mainmenu">{SHOP}</a>


------[OPEN]------
includes/usercp_viewprofile.php

------[FIND]------
//
// Generate page
//

------[ADD, BEFORE]------
if ($board_config['viewprofile'] == "images")
{
$itempurge = str_replace("Þ", "", $profiledata['user_items']);
$itemarray = explode('ß',$itempurge);
$itemcount = count ($itemarray);
$user_items = "<br>";
for ($xe = 0;$xe < $itemcount;$xe++)
{
if ($itemarray[$xe] != NULL)
{
if (file_exists('shop/images/'.$itemarray[$xe].'.jpg'))
{
$user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.jpg" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">';
}
elseif (file_exists('shop/images/'.$itemarray[$xe].'.gif'))
{
$user_items .= ' <img src="shop/images/'.$itemarray[$xe].'.gif" title="'.$itemarray[$xe].'" alt="'.$itemaray[$xe].'">';
}
}
}
$usernameurl = '<a href="'.append_sid('shop.'.$phpEx.'?action=inventory&searchid='.$profiledata['user_id'], true).'" class="nav">Items</a>: ';
}
elseif ($board_config['viewprofile'] == "link")
{
$usernameurl = '<a href="'.append_sid('shop.'.$phpEx.'?action=inventory&searchid='.$profiledata['user_id'], true).'" class="nav">Items</a>';
}

//start of effects store checks
$shoparray = explode("ß", $board_config['specialshop']);
$shoparraycount = count ($shoparray);
$shopstatarray = array();
for ($x = 0; $x < $shoparraycount; $x++)
{
$temparray = explode("Þ", $shoparray[$x]);
$shopstatarray[] = $temparray[0];
$shopstatarray[] = $temparray[1];
}
//end of effects store checks

$usereffects = explode("ß", $profiledata['user_effects']);
$userprivs = explode("ß", $profiledata['user_privs']);
$usercustitle = explode("ß", $profiledata['user_custitle']);
$userbs = array();
$usercount = count($userprivs);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
$usercount = count($usereffects);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
$usercount = count($usercustitle);
for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }

------[FIND]------
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,

------[ADD, AFTER]------
'INVENTORYLINK' => $usernameurl,
'INVENTORYPICS' => $user_items,


------[OPEN]------
/templates/*/profile_view_body.tpl

------[FIND]------
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>

------[ADD, AFTER]------
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{INVENTORYLINK}</span></td>
<td> <span class="gen">{INVENTORYPICS}</span></td>
</tr>


------[OPEN]------
includes/auth.php

------[FIND]------
global $db, $lang;

------[ADD, AFTER ]------
//start item auths
$itemarray = explode('ß', str_replace("Þ", "", $userdata['user_items']));

$sql = "select name, accessforum from phpbb_shopitems where accessforum != '0'";
if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, "Database Connection Error!<br>".mysql_error()); }
$num_rows = mysql_num_rows($result);

$itemformaccess = array();
for ($x = 0; $x < $num_rows; $x++)
{
$row = mysql_fetch_array($result);
if (in_array($row['name'], $itemarray))
{
$itemformaccess[] = $row['accessforum'];
}
}

------[FIND]------
if ( $forum_id != AUTH_LIST_ALL )
{
$value = $f_access[$key];

------[ADD, AFTER ]------
if (in_array($forum_id, $itemformaccess) && (!in_array("auth_sticky",$auth_fields) && !in_array("auth_announce",$auth_fields) && !in_array("auth_delete",$auth_fields) && ($userdata['user_level'] == 0)))
{
$value = 1;
}
------[FIND]------
for($k = 0; $k < count($f_access); $k++)
{
$value = $f_access[$k][$key];
$f_forum_id = $f_access[$k]['forum_id'];

------[ADD, AFTER ]------
if (in_array($forum_id, $itemformaccess) && (!in_array("auth_sticky",$auth_fields) && !in_array("auth_announce",$auth_fields) && !in_array("auth_delete",$auth_fields) && ($userdata['user_level'] == 0)))
{
$value = 1;
}


------[OPEN]------
index.php

------[FIND]------
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

------[ADD, AFTER ]------
$itemarray = explode('ß', str_replace("Þ", "", $userdata['user_items']));

$sql = "select name, accessforum from phpbb_shopitems where accessforum != '0' and accessforum > '0'";
if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, "Database Connection Error!".mysql_error()); }
$num_rows = mysql_num_rows($result);

$itemformaccess = array();
$itemcataccess = array();
for ($x = 0; $x < $num_rows; $x++)
{
$row = mysql_fetch_array($result);
if (in_array($row['name'], $itemarray))
{
$itemformaccess[] = $row['accessforum'];

$sql = "select cat_id from " . FORUMS_TABLE . " where forum_id = '{$row['accessforum']}'";
if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, "Database Connection Error: ".mysql_error()); }
$row2 = mysql_fetch_array($result);

$itemcataccess[] = $row2['cat_id'];
}
}

------[FIND]------
//
// Yes, we should, so first dump out the category

------[ADD, BEFORE]------
if (in_array($cat_id, $itemcataccess)) {
$display_forums = true;
}

------[FIND]------
if ( $is_auth_ary[$forum_id]['auth_view'] )

------[REPLACE WITH]------
if ( $is_auth_ary[$forum_id]['auth_view'] || in_array($forum_id, $itemformaccess))

------[SAVE/CLOSE ALL FILES]------


Look at the bold. And then, In the templates/8/viewtopic_body.tpl there is NO :

{postrow.POINTS}

(
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br />
<span class="gensmall"><b>{PAGINATION}</b><br />
</span></td>
</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
</tr>
</table>

<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr align="right">
<td class="catHead" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> </span></td>
</tr>
{POLL_DISPLAY}
<tr>
<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
<tr>
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--

if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('</td><td>&</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');

//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
</tr>
</table></td>
</tr>
<tr>
<td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END postrow -->
<tr align="center">
<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
<tr><form method="post" action="{S_POST_DAYS_ACTION}">
<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
</form></tr>
</table></td>
</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>

<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
<br />
{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>


Help me on this one. :D.
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

this is for upgrading the MOD, not installing it :
* requires : 2.0.0+ phpbb
* points mod
* OR cash mod version 2.x
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
User avatar
DonvanVliet
Registered User
Posts: 18
Joined: Sat Sep 06, 2003 11:01 am
Location: The Little House I Used To Live In
Contact:

Post by DonvanVliet »

"Users of the day" That's the mod I am trying to install. There is a part I don't understand and I couldn't find in the tutorial, so what do they mean by the commands below.



:oops:

// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############

$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}

$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;

while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}

$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;

$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;

if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}

//
// End of MOD
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

you have just to edit this part :

Code: Select all

/ ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############ 
if you need
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
User avatar
DonvanVliet
Registered User
Posts: 18
Joined: Sat Sep 06, 2003 11:01 am
Location: The Little House I Used To Live In
Contact:

Post by DonvanVliet »

Ok, but what about the part below that?? :cry:
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

don't touch
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
User avatar
AlleyKat
Registered User
Posts: 1037
Joined: Wed Jul 16, 2003 5:06 pm
Location: Odense, Denmark
Contact:

Post by AlleyKat »

What morpheus2matrix means is, that that entire piece of code should be inserted according to instructions. You only should change that part of it which is in the
/ ############ Edit below ############ -to-
// ############ Edit above ############
to fit your own setting, and together with those lines, insert or whatever the full piece of code. :D I' m realising that my explanation isn't all that good either, but I think you know what I mean.
Image Dansk phpBB support (uofficielt)
Find unofficial support in your language here.
Help translate Mozilla extensions @ Babelzilla - Your Language Counts Too!
Locked

Return to “[2.0.x] MODs in Development”