1

(8 replies, posted in PunBB 1.2 troubleshooting)

The coloring works now, but not on the 'Online Today' List, is that possible? To make it colored in the online today list?

2

(8 replies, posted in PunBB 1.2 troubleshooting)

avantgarde wrote:

Find:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }

Replace with:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }

Doesn't work. There's also a 2nd thing to do, what do I do with that?

Well, I have an punbb forum and I want to sent an e-mail to every registered member.

How?

Thanks in advance smile

4

(8 replies, posted in PunBB 1.2 troubleshooting)

Thank you very much. smile

I installed the colored usergroup mod again, but again it doesn't works on the index [who's online list].

I think I know what the problem is,

In the README it says somewhere:

#
#---------[ 35. OPEN ]---------------------------------------------------
#

include/functions.php

#
#---------[ 36. FIND (line:78) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 37. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 38. FIND (line:118) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 39. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().', \''.$pun_user['g_color'].'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

But when it says this:

#
#---------[ 36. FIND (line:78) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

It can't find that in my functions.php, what it does find is:

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

And when it says this:

#
#---------[ 38. FIND (line:118) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

It doesn't find that either in my functions.php, it does finds:

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

And when I just replace that with that I should do in the readme, it still doesn't works. So I have no clue what to do.

smile

5

(8 replies, posted in PunBB 1.2 troubleshooting)

Get this;
http://i196.photobucket.com/albums/aa12/anticoncept/1-2.jpg

Or most likely this:
http://i196.photobucket.com/albums/aa12/anticoncept/2-1.jpg
^ How do I get the Admin-Mod-Artists-Member thing there? and I've tried the colored username thing but I don't think it does all this^
And btw the colored username group mod didn't work on the index with me.

So anyone can help me out to get like what the second image has?

And yes both of the forums are punbb.

smile

No one ?

I'm sorry for my english.
What I mean is when you install the affliate mod, you see it in the forum, the part where the affliate images are shown. And if I have like 5 site's images, they're shown under eachother, and I want to make them slide horizontally on the screen.

Anyone?

Hi. smile

([]=The affliate image)

I want to put my affliates side my side like:  [] [] []

But now they're like this:

[]
[]
[]

And I also want to make them sliding over the screen [moving].

Is that possible? smile

Thanks.

Thanks, but I made a mistake in my post, I ment I want the forum names to be in Capitals, for example on this site:

-
PunBB.org News
Bug reports
Feature requests
Troubleshooting
Show off

etc.

How to make that in capitals?

Hello.

I want this:

http://i15.tinypic.com/5xfhgky.jpg

to be in capitals, on my forum, like ( on this forum )  ' Announcements - PunBB - General ''

That text, I want that to be in Capitals. And also the 'Index , Userlist, Rules, Search, Profile etc.

Anyone knows how?

smile

Hhmmm, no that didn't work.

To maybe clear up; this is what I want to be an image: (most likely pattern)
http://i7.tinypic.com/4p0jnnr.jpg

I don't know how; Now it looks like this:

/* 1.3 Main headers and navigation bar background and text colour */

.pun H2, #brdmenu {BACKGROUND-COLOR: #FC165B; COLOR: #1E1F1E}

How can I replace the bar with an image?

Great, thanks!
But is there anyway I can also center it + adding a dark background?

I want to add an image that refers to my forum.
Like ; you go to : '' www.mysitename.com''  and you see an image with '' ENTER ''
And you can click on it, and when you click on it, you go to '' www.mysitename.com/forums ''

Anyone knows how?

MattF wrote:

You can have as many subforums per parent forum as you want, but only one level deep. You cannot make sub-subforums.

I understand, but it only let's me select One parent forum. sad And it must already exist, so I must first create (for example) a new forum, and then select it as parent forum...

Because it only says in Admin/Forums - and you go to Edit forum - that you can only select one 'parent forum'

Isn't it possible that you have 2 subforums at one forum?


For example; You have staff applications for your site;

Staff Apps.
Subforums>
Accepted
Declined.

It already says that:

$result = $db->query('SELECT DISTINCT u.email, 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, g.g_color, 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.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());

^= From viewtopic.php line: 194.

I have no Idea what your talking about. Could you please be clear?
And i've just noticed it already says g.g_color in the list I showed you above,  in the end,....



? hmm

Smartys wrote:

That's not the main query, look further down viewtopic.php
The query looks very similar to the one they wanted you to modify

This one?
/ Retrieve the posts (and their respective poster/online status)
$result = $db->query('SELECT DISTINCT u.email, 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, g.g_color, 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.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());


With all those u.blabla

?

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT g.g_color, 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 g.g_color, 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());


I've tried it like this, but that doesn't works. It says 'Unable to fetch topic info' or something.

Could you tell me where and how exact to put it?
smile

winger wrote:

Also, I just changed it and it works, on userlist and viewtopic, but not in the index.

hmm

Make sure you followed the instructions properly for index.php

I've re-checked all things 3 times REALLY carefully.

big_smile

Also, I just changed it and it works, on userlist and viewtopic, but not in the index.

hmm

Smartys wrote:

It looks to me like you just have to add g.g_color to the list of columns in the select query

Where? tongue

Well I'm re-installing the Colored Username Mod, and now it's saying this:

#---------[ 25. OPEN ]---------------------------------------------------
#

viewtopic.php

#
#---------[ 26. FIND (line:186) ]---------------------------------------------------
#

$result = $db->query('SELECT DISTINCT u.email, 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.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());

#
#---------[ 27. REPLACE WITH ]---------------------------------------------------
#

$result = $db->query('SELECT DISTINCT u.email, 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, g.g_color, 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.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());


But there's no '' SELECT DISTINCT' in my viewtopic.php


I can find the rest but there's no SELECT DISTINCT ..

I've installed the Colored Usergroup Mod, and when you see the 'Who's online list', you see all the same colors. I've put it on some grey tint (the members) and it just shows the same color as me (Admin).
But when I go to userlist it does works, it shows the right member and admin color.

I've probably made some mistakes while installing, but after I installed it didn't worked and I've checked ALL again and fixed a lot of errors.
Any of you know what could be the problem sad?


Oh and when you install this, does it also shows you the member legends?
Like beneath the who's online now list:

-Administrators-  -Moderators -Members-

?

Or is that an other mod?