1

Topic: Would like "THIS" for my forum

http://www.webdeveloper.com/forum/showt … hp?t=74082

Great. Simply Great. Clic on the blue button next to the pseudo ... very great !

With this, you can put all infos of the members : the only thing appearing is its pseudo + title + avatar : very minimal look, but great.

Would it be so hard to do this ?

2

Re: Would like "THIS" for my forum

I had a look at the JavaScript they are using and it looks way too big for the simplicity punBB offers.
Also it's vBulletin code which I suppose is not GPLed wink
I'm sure it can be done with less code though - but still requires some JavaScript.
Interesting, maybe I'll give it a try later on.

The German PunBB Site:
PunBB-forum.de

3

Re: Would like "THIS" for my forum

It would be cool.

The deal ? Simple. Paul has had a great vision with viewtopic.php. Indeed, when I redesigned totally my site, I have seen with float you could put without changing the core code the name + photo in front of the topic. All "inutile" informations, like Country, Registered, numbers of posts ... can be hidden and viewed only by a popup dhtml ... there are a lot of "light" scripts ... and if people don't have javascript, no soucy : you clic on the name to have the profil page ! smile

In my case putting the name + avatar in front of is great.

4

Re: Would like "THIS" for my forum

I played around with that a bit.
The problem for me was that once the popup opened and closed again it left a "hole" on the page.
Alternatively I opened a popup layer next to the image but it stayed there when I scrolled down, so I got annoyed by all this and gave up smile

I hate all these cross browser issues so for years I stayed away from css, just cared about my code and left the design to the designers.
Unfortunately, this habit didn't make me a CSS guru smile

Anyway, if you have a snippet with a popup layer that you can show and hide without destroying the rest of the layout and that behaves like you expect - post it and I'll do the rest.
Fair deal?

The German PunBB Site:
PunBB-forum.de

Re: Would like "THIS" for my forum

Wouldn't it be even more elegant to have the information appear like a "tool-tip" when you mouse over the avatar image.... There would be no "button" calling out this feature, but users would discover it quite quickly.

6

Re: Would like "THIS" for my forum

From the programming point of view it is absolutely the same.
Even more, the behaviour can be changed in seconds between "Click" and "mouseover"...

The German PunBB Site:
PunBB-forum.de

7 (edited by Rod 2005-08-03 23:43)

Re: Would like "THIS" for my forum

The script I use for the reste of my site ... is quite great and very light.

If you do an onmouseover / onmouseout, simply a tip layer.

But if you onomouseover on the layer, it "stays" : you leave the layer, it disappears ... ! smile


So ... http://www.dynamicdrive.com/dynamicinde … inkcss.htm

If you are ok with THIS, I have other ideas ... smile

8

Re: Would like "THIS" for my forum

This one has a problem:
It does not appear in front, it always stays behind some other elements and it does not listen to the z-Index.

I don't know if this can be solved or if it is an issue with the punBB css.

Any other idea? wink

The German PunBB Site:
PunBB-forum.de

9

Re: Would like "THIS" for my forum

I use this script with a very complicated structure (Pseudo Frame CSS) ... and I have only a problem of position : but the script permits to change this ... if you have a demo to show me, I can resolve, I think the "little" problem smile

10 (edited by Tobi 2005-08-04 17:32)

Re: Would like "THIS" for my forum

This is a sample page:
http://www.gotohellas.de/puntest/testoutput.htm

It's a saved version of some viewtopic.php output but you will see what I mean...hope you can solve this.

Forgot to mention:
I put the css under the "Click me"string, in case you didn't guess it smile

The German PunBB Site:
PunBB-forum.de

11

Re: Would like "THIS" for my forum

All works fine for me !!!!

But you know : you can put EVERYWHERE inside the div !

Very great !

12

Re: Would like "THIS" for my forum

Rod wrote:

All works fine for me !!!

Lucky you smile

It looks really shitty in Firefox 1.0.4 though.

And what do you mean with I can put everywhere?
I guess it has to be somewehere close to the link because there is a loop in the script where I have to put everything.

Can you take a look with Firefox and maybe tell me *where* to put everything?
Then I could easily integrate it.

The German PunBB Site:
PunBB-forum.de

13

Re: Would like "THIS" for my forum

Oh yes I see ... I think (I'm under FF 1.0.6) FF doesn't like the extra border-left which creates the border of the viewtopic layout.

We have 2 solutions.
1. Put all the datas AFTER the footer : indeed the layout is called by its number so it can put it everywhere ... I'm think it's because the div is inside we have this bug.

2e solution : find another script smile

Inside ???
"From :
Registered :
Posts :
MSN / YAHOO ... blablabla ...
"

In fact, we could put the entire profile inside, it's not a problem.

With this method, you can change the layout of Pun because the datas can take place anymore.

14 (edited by Tobi 2005-08-05 12:19)

Re: Would like "THIS" for my forum

Rod wrote:

We have 2 solutions.
1. Put all the datas AFTER the footer : indeed the layout is called by its number so it can put it everywhere ... I'm think it's because the div is inside we have this bug.

Sure this works?

EDIT:

Yeah, this works!!
Now:

Rod wrote:

In fact, we could put the entire profile inside, it's not a problem.

It is a problem. It is causing a lot of traffic overhead because the data will be always transmitted, visible or not.
Don't you think it would be good to limit the entries on 3 or 4 really important ones?
And would you please suggest what this may be?
Like f.e.
POSTS
REGISTERED
CITY/COUNTRY
WEBSITE

Or what do you think?

Then I'll set everything up and we have a mod smile

The German PunBB Site:
PunBB-forum.de

15

Re: Would like "THIS" for my forum

OK,
I finished this one.
What it does now is it adds a third option to "Show user info" in the administration
So, instead of "yes" or "No" you can now choose "In Foldout menu" and you will see the same information there.

However, the CLICK ME doesn't look nice, maybe you have a nice idea for this.

##      Description:  This mod needs the Anylink CSS Menu.
##                    Please download it here:
##                    http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

##                    It adds a foldout menu next to the poster's name
##                    in viewtopic.php.
##                    This menu contains the information that is usually only visible 
##                    when Show INfo is set to "1" in the "Options" administration. 
##                    For the menu there is now a new radiobutton in the administration 
##                    that allows to display this foldout menu instead.
##                    So, to activate this module you must go to the OPTIONS administrations
##                    and set "User info in posts" to "In Foldout Menu".
##
##   Affected files:  header.php
##                    viewtopic.php
##
##       Affects DB:  No
##
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

#
#---------[ 1. DOWNLOAD ]------------------------------------------------------
#

http://www.dynamicdrive.com/dynamicindex1/anylink.css

#---------[ 2. MOVE FILE TO ]---------------------------------------------------
#

your installation folder

#
#---------[ 3. DOWNLOAD ]---------------------------------------------------
#

http://www.dynamicdrive.com/dynamicindex1/anylink.js

#
#---------[ 4. MOVE FILE TO ]---------------------------------------------------
#
your installation folder



#
#---------[ 5. OPEN ]---------------------------------------------------
#

header.php

#
#---------[ 6. FIND (line:76) ]---------------------------------------------------
#

<script type="text/javascript">

#
#---------[ 7. BEFORE, ADD ]---------------------------------------------------
#

<!-- MOD USERINFO  -->
<link rel="stylesheet" type="text/css" href="<? echo PUN_ROOT?>anylink.css" />
<script type="text/javascript" src="<? echo PUN_ROOT?>anylink.js">
/***********************************************
* AnyLink CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<!--// MOD USERINFO  -->



#
#---------[ 8. OPEN ]---------------------------------------------------
#
viewtopic.php


#
#---------[ 9. FIND (line:183) ]---------------------------------------------------
#

$post_count = 0;  // Keep track of post numbers

#
#---------[ 10. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
$tpct = 1;

#
#---------[ 11. FIND (line:201) ]---------------------------------------------------
#

    $username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';

#
#---------[ 12. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
  if($pun_config['o_show_user_info'] == '2')
    $username .= ' <a href="#" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, \'anylinkmenu'.$tpct.'\')">CLICKME</a>';
 //END  MOD USERINFO
  
#
#---------[ 13. FIND (line:250) ]---------------------------------------------------
#

        $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
    }
#
#---------[ 14. AFTER, ADD ]---------------------------------------------------
#

// MOD  USERINFO    
    elseif($pun_config['o_show_user_info'] == '2')  {
      if ($cur_post['location'] != '')
      {
        if ($pun_config['o_censoring'] == '1')
          $cur_post['location'] = censor_words($cur_post['location']);
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']).'</a>';
      }

      $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']).'</a>';

      if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Posts'].': '.$cur_post['num_posts'].'</a>';

      // Now let's deal with the contact links (E-mail and URL)
      if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
      else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
        $user_info[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';

      if ($cur_post['url'] != '')
        $user_info[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
    $mod_info[] = array($tpct, $user_info);
    unset($user_info);
    }
    $tpct++;
// END MOD  USERINFO    

  
#
#---------[ 15. FIND (line:438) ]---------------------------------------------------
#

$footer_style = 'viewtopic';
  
#
#---------[ 16. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
if($pun_config['o_show_user_info'] == '2')  {
  foreach($mod_info as $posterinfo) {
    ?>
<div id="anylinkmenu<?php echo $posterinfo[0]?>" class="anylinkcss postleft">
  <?php
    foreach($posterinfo[1] as $udata) {
  echo $udata."\n";
  }
  ?>
</div>
<?php 
    }
  }

  
#
#---------[ 17. OPEN ]---------------------------------------------------
#

admin_options.php

#
#---------[ 18. FIND (line:344) ]---------------------------------------------------
#

                    <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong>   <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>

#
#---------[ 19. CHANGE TO ]---------------------------------------------------
#
                    <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong>   <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>   <input type="radio" name="form[show_user_info]" value="2"<?php if ($pun_config['o_show_user_info'] == '2') echo ' checked="checked"' ?> /> <strong>In Foldout Menu</strong>
The German PunBB Site:
PunBB-forum.de

16

Re: Would like "THIS" for my forum

I test it this evening !!! smile It would be cool smile

Is there restrictions by groups ? For example I would like guests see nothing ...

17

Re: Would like "THIS" for my forum

Rod wrote:

I test it this evening !!! smile It would be cool smile

Is there restrictions by groups ? For example I would like guests see nothing ...

It behaves exactly like the "normal" admin option "User info in posts".
I think guests see verything if that option is checked so they will see everything with this mod as well.

This has nothing to do with what you wanted to have originally anyway... wink

The German PunBB Site:
PunBB-forum.de

18

Re: Would like "THIS" for my forum

2 things ... smile
1. it doesn't work ... when I install the option inside admin_options, I have the checked box, the "clickme" links appears, the layers are created at footer ... but nothing happens when I "click"

Another suggestion : when you choice "IN", the "info user" disappears like "no" > otherwise the popup has any interest smile

May the force be with you ... I let you my code of viewtopic.php

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB 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.

  PunBB 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.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';


if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);


$action = isset($_GET['action']) ? $_GET['action'] : null;
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
$pid = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
if ($id < 1 && $pid < 1)
    message($lang_common['Bad request']);

// Load the viewtopic.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';


// If a post ID is specified we determine topic ID and page number so we can redirect to the correct message
if ($pid)
{
    $result = $db->query('SELECT topic_id FROM '.$db->prefix.'posts WHERE id='.$pid) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    if (!$db->num_rows($result))
        message($lang_common['Bad request']);

    $id = $db->result($result);

    // Determine on what page the post is located (depending on $pun_user['disp_posts'])
    $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY posted') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $num_posts = $db->num_rows($result);

    for ($i = 0; $i < $num_posts; ++$i)
    {
        $cur_id = $db->result($result, $i);
        if ($cur_id == $pid)
            break;
    }
    ++$i;    // we started at 0

    $_GET['p'] = ceil($i / $pun_user['disp_posts']);
}

// If action=new, we redirect to the first new post (if any)
else if ($action == 'new' && !$pun_user['is_guest'])
{
    $result = $db->query('SELECT MIN(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id.' AND posted>'.$pun_user['last_visit']) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $first_new_post_id = $db->result($result);

    if ($first_new_post_id)
        header('Location: viewtopic.php?pid='.$first_new_post_id.'#p'.$first_new_post_id);
    else    // If there is no new post, we go to the last post
        header('Location: viewtopic.php?id='.$id.'&action=last');

    exit;
}

// If action=last, we redirect to the last post
else if ($action == 'last')
{
    $result = $db->query('SELECT MAX(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $last_post_id = $db->result($result);

    if ($last_post_id)
    {
        header('Location: viewtopic.php?pid='.$last_post_id.'#p'.$last_post_id);
        exit;
    }
}


// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

if (!$db->num_rows($result))
    message($lang_common['Bad request']);

$cur_topic = $db->fetch_assoc($result);

// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array();
$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false;

// Can we or can we not post replies?
if ($cur_topic['closed'] == '0')
{
    if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1' || $is_admmod)
        $post_link = '<a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
    else
        $post_link = ' ';
}
else
{
    $post_link = $lang_topic['Topic closed'];

    if ($is_admmod)
        $post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
}


// Determine the post offset (based on $_GET['p'])
$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
$start_from = $pun_user['disp_posts'] * ($p - 1);

// Generate paging links
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewtopic.php?id='.$id);


if ($pun_config['o_censoring'] == '1')
    $cur_topic['subject'] = censor_words($cur_topic['subject']);


$quickpost = false;
if ($pun_config['o_quickpost'] == '1' &&
    !$pun_user['is_guest'] &&
    ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1')) &&
    ($cur_topic['closed'] == '0' || $is_admmod))
{
    $required_fields = array('req_message' => $lang_common['Message']);
    $quickpost = true;
}

if (!$pun_user['is_guest'] && $pun_config['o_subscriptions'] == '1')
{
    if ($cur_topic['is_subscribed'])
        // I apologize for the variable naming here. It's a mix of subscription and action I guess :-)
        $subscraction = '<p class="subscribelink clearb">'.$lang_topic['Is subscribed'].' - <a href="misc.php?unsubscribe='.$id.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
    else
        $subscraction = '<p class="subscribelink clearb"><a href="misc.php?subscribe='.$id.'">'.$lang_topic['Subscribe'].'</a></p>'."\n";
}
else
    $subscraction = '<div class="clearer"></div>'."\n";

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

?>
<div class="linkst">
    <div class="inbox">
        <p class="pagelink conl"><?php echo $paging_links ?></p>
        <p class="postlink conr"><?php echo $post_link ?></p>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>

<?php


require PUN_ROOT.'include/parser.php';

$bg_switch = true;    // Used for switching background color in posts
$post_count = 0;    // Keep track of post numbers


// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                         MOD USERINFO
$tpct = 1;
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


// Retrieve the posts (and their respective poster/online status)
$result = $db->query('SELECT u.email, u.realname, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
while ($cur_post = $db->fetch_assoc($result))
{
    $post_count++;
    $user_avatar = '';
    $user_info = array();
    $user_contacts = array();
    $post_actions = array();
    $is_online = '';
    $signature = '';

    // If the poster is a registered user.
    if ($cur_post['poster_id'] > 1)
    {
        $username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';

// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                         MOD USERINFO
          if($pun_config['o_show_user_info'] == '2')
           $username .= ' <a href="#" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, \'anylinkmenu'.$tpct.'\')">CLICKME</a>';
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        $user_title = get_title($cur_post);

        if ($pun_config['o_censoring'] == '1')
            $user_title = censor_words($user_title);

        // Format the online indicator
        $is_online = ($cur_post['is_online'] == $cur_post['poster_id']) ? '<strong>'.$lang_topic['Online'].'</strong>' : $lang_topic['Offline'];

        if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
        {
            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '';

        // We only show location, register date, post count and the contact links if "Show user info" is enabled
        if ($pun_config['o_show_user_info'] == '1')
        {
            if ($cur_post['location'] != '')
            {
                if ($pun_config['o_censoring'] == '1')
                    $cur_post['location'] = censor_words($cur_post['location']);

                $user_info[] = '<dd>'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']);
            }

            $user_info[] = '<dd>'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']);

            if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
                $user_info[] = '<dd>'.$lang_common['Posts'].': '.$cur_post['num_posts'];

            // Now let's deal with the contact links (E-mail and URL)
            if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
                $user_contacts[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
            else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
                $user_contacts[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';

            if ($cur_post['url'] != '')
                $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
        }

// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                         MOD USERINFO 
    elseif($pun_config['o_show_user_info'] == '2')  {
      if ($cur_post['location'] != '')
      {
        if ($pun_config['o_censoring'] == '1')
          $cur_post['location'] = censor_words($cur_post['location']);
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']).'</a>';
      }

      $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']).'</a>';

      if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Posts'].': '.$cur_post['num_posts'].'</a>';

      // Now let's deal with the contact links (E-mail and URL)
      if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
      else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
        $user_info[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';

      if ($cur_post['url'] != '')
        $user_info[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
    $mod_info[] = array($tpct, $user_info);
    unset($user_info);
    }
    $tpct++;
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


        if ($pun_user['g_id'] < PUN_GUEST)
        {
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a><br /><br /><strong>'.$cur_post['realname'].'</strong>';

            if ($cur_post['admin_note'] != '')
                $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';
        }
    }
    // If the poster is a guest (or a user that has been deleted)
    else
    {
        $username = pun_htmlspecialchars($cur_post['username']);
        $user_title = get_title($cur_post);

        if ($pun_user['g_id'] < PUN_GUEST)
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

        if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'])
            $user_contacts[] = '<a href="mailto:'.$cur_post['poster_email'].'">'.$lang_common['E-mail'].'</a>';
    }

    // Generation post action array (quote, edit, delete etc.)
    if (!$is_admmod)
    {
        if (!$pun_user['is_guest'])
            $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>';

        if ($cur_topic['closed'] == '0')
        {
            if ($cur_post['poster_id'] == $pun_user['id'])
            {
                if ((($start_from + $post_count) == 1 && $pun_user['g_delete_topics'] == '1') || (($start_from + $post_count) > 1 && $pun_user['g_delete_posts'] == '1'))
                    $post_actions[] = '<li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>';
                if ($pun_user['g_edit_posts'] == '1')
                    $post_actions[] = '<li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>';
            }

            if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
                $post_actions[] = '<li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';
        }
    }
    else
        $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>'.$lang_topic['Link separator'].'</li><li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>'.$lang_topic['Link separator'].'</li><li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>'.$lang_topic['Link separator'].'</li><li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';


    // Switch the background color for every message.
    $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true;
    $vtbg = ($bg_switch) ? ' roweven' : ' rowodd';


    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

    // Do signature parsing/caching
    if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
    {
        if (isset($signature_cache[$cur_post['poster_id']]))
            $signature = $signature_cache[$cur_post['poster_id']];
        else
        {
            $signature = parse_signature($cur_post['signature']);
            $signature_cache[$cur_post['poster_id']] = $signature;
        }
    }

?>
<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">
    <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
    <div class="box">
        <div class="inbox">
            <div class="postleft">
                <dl>
                    <dt><strong><?php echo $username ?></strong></dt>
                    <dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
                    <dd class="postavatar"><?php echo $user_avatar ?></dd>
<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode('  ', $user_contacts).'</dd>'."\n"; ?>
                </dl>
            </div>
            <div class="postright">
                <h3><?php if (($post_count + $start_from) > 1) echo ' Re: '; ?><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></h3>
                <div class="postmsg">
                    <?php echo $cur_post['message']."\n" ?>
<?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
                </div>
<?php if ($signature != '') echo "\t\t\t\t".'<div class="postsignature"><hr />'.$signature.'</div>'."\n"; ?>
            </div>
            <div class="clearer"></div>
            <div class="postfootleft"><?php if ($cur_post['poster_id'] > 1) echo '<p>'.$is_online.'</p>'; ?></div>
            <div class="postfootright"><?php echo (count($post_actions)) ? '<ul>'.implode($lang_topic['Link separator'].'</li>', $post_actions).'</li></ul></div>'."\n" : '<div> </div></div>'."\n" ?>
        </div>
    </div>
</div>

<?php

}

?>
<div class="postlinksb">
    <div class="inbox">
        <p class="postlink conr"><?php echo $post_link ?></p>
        <p class="pagelink conl"><?php echo $paging_links ?></p>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
        <?php echo $subscraction ?>
    </div>
</div>

<?php

// Display quick post if enabled
if ($quickpost)
{

?>
<div class="blockform">
    <h2><span><?php echo $lang_topic['Quick post'] ?></span></h2>
    <div class="box">
        <form method="post" action="post.php?tid=<?php echo $id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
            <div class="inform">
                <fieldset>
                    <legend><?php echo $lang_common['Write message legend'] ?></legend>
                    <div class="infldset txtarea">
                        <input type="hidden" name="form_sent" value="1" />
                        <input type="hidden" name="form_user" value="<?php echo (!$pun_user['is_guest']) ? pun_htmlspecialchars($pun_user['username']) : 'Guest'; ?>" />
                        <label><textarea name="req_message" rows="7" cols="75" tabindex="1"></textarea></label> <?php require PUN_ROOT.'mod_easy_bbcode.php'; ?>
                        <ul class="bblinks">
                            <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                            <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                            <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                        </ul>
                    </div>
                </fieldset>
            </div>
            <p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
        </form>
    </div>
</div>
<?php

}

// Increment "num_views" for topic
$low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
$db->query('UPDATE '.$low_prio.$db->prefix.'topics SET num_views=num_views+1 WHERE id='.$id) or error('Unable to update topic', __FILE__, __LINE__, $db->error());

$forum_id = $cur_topic['forum_id'];
$footer_style = 'viewtopic';


// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                         MOD USERINFO 
if($pun_config['o_show_user_info'] == '2')  {
  foreach($mod_info as $posterinfo) {
    ?>
<div id="anylinkmenu<?php echo $posterinfo[0]?>" class="anylinkcss postleft">
  <?php
    foreach($posterinfo[1] as $udata) {
  echo $udata."\n";
  }
  ?>
</div>
<?php
    }
  }
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


require PUN_ROOT.'footer.php';

19

Re: Would like "THIS" for my forum

Rod wrote:

1. it doesn't work ... when I install the option inside admin_options, I have the checked box, the "clickme" links appears, the layers are created at footer ... but nothing happens when I "click"

Do the popups show up?
Then it's OK, the "click me" is a placeholder more or less, don't know if something special should happen on click...
But if the popups do not show up please consult your javascript debugger and tell me what it says.
Do you have both files downloaded and installed?

Rod wrote:

Another suggestion : when you choice "IN", the "info user" disappears like "no" > otherwise the popup has any interest smile

Don't know what you mean.
Chose "IN" where?
And what do you suggest to happen there?

Rod wrote:

May the force be with you ... I let you my code of viewtopic.php

Looks fine. I guess it's more the header.php or the files not where they belong.

The German PunBB Site:
PunBB-forum.de

20

Re: Would like "THIS" for my forum

I have tested again, point per point, it doesn't work sad I'm damned.

21

Re: Would like "THIS" for my forum

What exactly doesn't work?

The German PunBB Site:
PunBB-forum.de

22

Re: Would like "THIS" for my forum

i read instructions and do all things .. but don't work

it's just me...

23 (edited by Tobi 2005-08-17 18:20)

Re: Would like "THIS" for my forum

faax wrote:

i read instructions and do all things .. but don't work

Yes, but what exactly doesn't work?
Any error messages, if not what is missing etc.
I'd really like to search for a solution but I need to find the mistake first.
Funny thing is that it works here so I have no clue what could be wrong if nobody can tell me exaclty......

The German PunBB Site:
PunBB-forum.de

24

Re: Would like "THIS" for my forum

From me : any js error ... or something like that : all is ok (css, menu, admin, layers created inside the code), but when clicked, any layer appears.

25

Re: Would like "THIS" for my forum

Form me ... CLICKME is modified to Info and when i click nothing happend ... Location of the link is viewtopic.php?id=some topic but nothing happend when i click ...
Sorry about bad English wink

it's just me...