[ABD] Welcome Panel 0.1.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
satandream
Registered User
Posts: 383
Joined: Thu Mar 06, 2008 12:47 pm

Re: [BETA] Welcome Panel 0.1.1

Post by satandream »

Will this mod be picked up by anybody as its a nice mod
User avatar
Typo
Former Team Member
Posts: 404
Joined: Tue Dec 30, 2008 6:12 am
Location: USA
Name: Jeremy Lorenzo
Contact:

Re: [BETA] Welcome Panel 0.1.1

Post by Typo »

I wanted to share some changes to the prosilver welcome panel html file. It makes it look better and cleans up the code.

Before and after (click to enlarge when you are taken to site with image):
Image

To make the changes, take the whole original code from the following file and replace the entire thing.
OPEN: /root/styles/prosilver/template/welcome_panel.html
FIND:

Code: Select all

<!-- IF S_USER_LOGGED_IN and not S_IS_BOT -->
<div class="forabg">
<table class="inner" border="0" width="100%" align="center">
<span class="corners-top">
</span>
<tr class="topiclist">
    <td class="header" colspan="3" align="center">
        <strong>{GWP_PANEL_TITLE} {USERNAME}!</strong>    </td>
</tr>
<tbody class="navbar">
    <tr>
        <td align="center" width="18%">
        <!--IF AVATAR_FILE--><a href="ucp.php?i=profile&mode=avatar"><img src="{PHPBB_ROOT_PATH}download/file.php?avatar={AVATAR_FILE}" alt="Edit your avatar" /></a><!--ENDIF-->        </td>
        <td width="40%" align="left" valign="top">
          <strong>{GWP_WELCOME_BACK}, <a href="memberlist.php?mode=viewprofile&u={USER_ID}">{USERNAME}</a>!</strong>
          <hr size="1" />
         {GWP_NEW_POSTS_LEFT} <b><a href="search.php?search_id=newposts">{NEW_POST_COUNT}</a></b> {GWP_NEW_POSTS_RIGHT}<br />
          
          <table width="80%" cellspacing="0" cellpadding="2" border="0" align="center">
            <tr>
            <td width="50%" align="left">&nbsp;</td>
            <td width="50%" align="right"><!-- IF S_DISPLAY_PM -->
              {GWP_PM_COUNT_LEFT} <a href="{U_PRIVATEMSGS}">{PM_COUNT}</a> {GWP_PM_COUNT_RIGHT}              <!-- ENDIF --></td>
            </tr>
          </table>
        <hr size="1" />
        <div align="center"><a href="ucp.php?i=164"><font size="-2">{GWP_EDIT_PROFILE}</font></a></div>
      </td>
        <td width="42%" align="left" valign="top">
        <strong>{GWP_YOUR_STATS}:</strong>
        <hr size="1" />
        &raquo; {GWP_POST_COUNT_TEXT}: <b><a href="search.php?author_id={USER_ID}&sr=posts">{USER_POST_COUNT}</a></b>
      <br />
            <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
            <tr>
            <td width="50%" align="left">&raquo; {GWP_POSTS_PD_TEXT}: <b>{POSTS_PD}</b></td>
            </tr>
            </table>
        <hr size="1" />
        <div align="center">{GWP_MEMBERS}: <b><a href="memberlist.php">{USER_COUNT}</a></b> | {GWP_THREADS}: <b>{TOPIC_COUNT}</b> | {GWP_POSTS}: <b>{POST_COUNT}</b></div>
      </td>
    </tr>
</tbody>
</table>
<span class="corners-bottom">
</span>
</div>
<br />
<!-- ENDIF -->
REPLACE WITH:

Code: Select all

<!-- IF S_USER_LOGGED_IN and not S_IS_BOT -->
<div class="forabg"><span class="corners-top"></span>
<table class="inner" border="0" width="100%" align="center">
<tr class="topiclist">
        <td class="header" colspan="3" align="center">
        <strong>{GWP_PANEL_TITLE} {USERNAME}!</strong>    </td>
</tr>
<tbody class="navbar">
    <tr>
        <td align="center" width="18%"><!--IF AVATAR_FILE--><a href="ucp.php?i=profile&mode=avatar"><img src="{PHPBB_ROOT_PATH}download/file.php?avatar={AVATAR_FILE}" alt="Edit your avatar" /></a><!--ENDIF--></td>
        <td width="41%" align="left" valign="top">
           <strong>{GWP_WELCOME_BACK}, <a href="memberlist.php?mode=viewprofile&u={USER_ID}">{USERNAME}</a>!</strong>
           <hr size="1" />
           &raquo; {GWP_NEW_POSTS_LEFT} <b><a href="search.php?search_id=newposts">{NEW_POST_COUNT}</a></b> {GWP_NEW_POSTS_RIGHT}<br />     
              <!-- IF S_DISPLAY_PM -->&raquo; {GWP_PM_COUNT_LEFT} <a href="{U_PRIVATEMSGS}">{PM_COUNT}</a> {GWP_PM_COUNT_RIGHT}<!-- ENDIF -->
              <hr size="1" />
              <div align="center">{GWP_MEMBERS}: <b><a href="memberlist.php">{USER_COUNT}</a></b> | {GWP_THREADS}: <b>{TOPIC_COUNT}</b> | {GWP_POSTS}: <b>{POST_COUNT}</b></div>
        </td>
        <td width="41%" align="left" valign="top">
           <strong>{GWP_YOUR_STATS}:</strong>
           <hr size="1" />
           &raquo; {GWP_POST_COUNT_TEXT}: <b><a href="search.php?author_id={USER_ID}&sr=posts">{USER_POST_COUNT}</a></b><br />
              &raquo; {GWP_POSTS_PD_TEXT}: <b>{POSTS_PD}</b>
              <hr size="1" />
              <div align="center"><a href="ucp.php?i=164"><font size="-2">{GWP_EDIT_PROFILE}</font></a></div>
        </td>
    </tr>
</tbody>
</table>
<span class="corners-bottom"></span></div>
<br />
<!-- ENDIF -->
Hope someone finds this usefull.

Typo
Khamosh-Saya
Registered User
Posts: 871
Joined: Fri Nov 23, 2007 6:46 am
Location: UAE
Name: Jamshed Ansari
Contact:

Re: [BETA] Welcome Panel 0.1.1

Post by Khamosh-Saya »

i m facing this problem when we come through Guest

Code: Select all

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 43 bytes) in /home/friendz/public_html/includes/db/mysql.php on line 233
i have contact with support team here is the topic link
http://www.phpbb.com/community/viewtopi ... &t=1526275

Also One thing
ameeck wrote:I'm sorry, but I can't provide support for unknown MODs, try contacting the MOD author. Tell him this is plain suicide:

Code: Select all

$sql = 'SELECT post_id
    FROM ' . POSTS_TABLE . ' 
      WHERE post_time > ' . $user->data['user_lastvisit'] . '
    AND poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = sizeof($db->sql_fetchrowset($result));  
and that he should try using SELECT COUNT(...
Any Help????
User avatar
therat
Registered User
Posts: 285
Joined: Sun Apr 07, 2002 6:06 pm
Contact:

Re: [BETA] Welcome Panel 0.1.1

Post by therat »

I think this should be better, not 100% sure though

Code: Select all

$sql = 'SELECT COUNT(post_id) as num_posts
        FROM
                ' . POSTS_TABLE . ' 
        WHERE
                post_time > ' . $user->data['user_lastvisit'] . '
        AND
                poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = $db->sql_fetchfield('num_posts');
$db->sql_freeresult($result); 
User avatar
Gleasonator
Registered User
Posts: 652
Joined: Tue Jun 05, 2007 2:19 pm
Location: Texas
Contact:

Re: [BETA] Welcome Panel 0.1.1

Post by Gleasonator »

AAAAAHHHHH

ABDABDABD

I made this mod by copying and pasting code when I was learning what an if statement was, and it's utter crap. Somebody, anybody, clean up this code please, but I don't want to support this anymore. Last time I tried cleaning up the code I realized that what I'd put together was such hackish crap that it might as well be completely re-written.
Sorry for my bad Engrish !
gleason|design

Image
Khamosh-Saya
Registered User
Posts: 871
Joined: Fri Nov 23, 2007 6:46 am
Location: UAE
Name: Jamshed Ansari
Contact:

Re: [ABD] Welcome Panel 0.1.1

Post by Khamosh-Saya »

i m using this mod on my another forum
www.friendzpoint.com/forum
and working perfectly

dont know where is the actuall problem
i m newbie
dont know about php
Khamosh-Saya
Registered User
Posts: 871
Joined: Fri Nov 23, 2007 6:46 am
Location: UAE
Name: Jamshed Ansari
Contact:

Re: [BETA] Welcome Panel 0.1.1

Post by Khamosh-Saya »

therat wrote:I think this should be better, not 100% sure though

Code: Select all

$sql = 'SELECT COUNT(post_id) as num_posts
        FROM
                ' . POSTS_TABLE . ' 
        WHERE
                post_time > ' . $user->data['user_lastvisit'] . '
        AND
                poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = $db->sql_fetchfield('num_posts');
$db->sql_freeresult($result); 
Thanks therat
its working Fine :)
Thanks alot
User avatar
scouthostinguk
Registered User
Posts: 62
Joined: Fri Nov 07, 2008 12:28 pm
Location: Bishops Stortford, England
Contact:

Re: [ABD] Welcome Panel 0.1.1

Post by scouthostinguk »

Hi,

I'm have some errors with showing off-site avaters and on-site avater

When useing the code below it only shows on-site avaters

Code: Select all

<!--IF AVATAR_FILE--><a href="ucp.php?i=profile&mode=avatar"><img src="{PHPBB_ROOT_PATH}download/file.php?avatar={AVATAR_FILE}" alt="Edit your avatar" width="100" /></a><!--ENDIF-->
But when you remove the

Code: Select all

{PHPBB_ROOT_PATH}download/file.php?avatar=
from the line

It shows off-site avaters, but not on-site avaters

Code: Select all

<!--IF AVATAR_FILE--><a href="ucp.php?i=profile&mode=avatar"><img src="{AVATAR_FILE}" alt="Edit your avatar" width="100" /></a><!--ENDIF-->
How do you show both on-site and off-site avaters?
Khamosh-Saya
Registered User
Posts: 871
Joined: Fri Nov 23, 2007 6:46 am
Location: UAE
Name: Jamshed Ansari
Contact:

Re: [ABD] Welcome Panel 0.1.1

Post by Khamosh-Saya »

I have one error
when i debug on it give me one error

Code: Select all

[phpBB Debug] PHP Notice: in file /index.php on line 153: Undefined variable: member
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3895: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3255)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3897: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3255)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3898: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3255)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3899: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3255)
This is the line 153

Code: Select all

	'POSTS_PCT'				=> ($config['num_posts']) ? min(100, ($member['user_posts'] / $config['num_posts']) * 100) : 0,
	'POSTS_PD'				=> $user->data['user_posts'] / max(1, round((time() - $user->data['user_regdate']) / 86400)),
What to Do??
Locked

Return to “[3.0.x] Abandoned MODs”