doh, thanks
Beagle
2 2008-09-02 16:22
Re: PunBB 1.2.3 (15 replies, posted in News)
Have I missed something. The dates indicate this is 3yrs old, but wouldn't 1.2.3 be further along than 1.2.2x?
Beagle
3 2008-09-01 20:43
Re: Adding things to User List (14 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Fairly easy:
1st open userlist.php
Go to line 150 where it says
<th class="tcr" scope="col"><?php echo $lang_common['Registered'] ?></th>
After that, add
<th class="tcr" scope="col"><?php echo $lang_common['Last visit'] ?></th>
Now, go to line 158:
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
and replace it with
$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, u.last_visit, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());
Finally, find in line 171
<td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>
and after that, add
<td class="tcr"><?php echo format_time($user_data['last_visit'], true) ?></td>
@InuKalriko:
You can do this with any field available in the users- or groups - table.
Works great, thanks. Is there a simple way to include the time in the newly created field along with "last visit"?
Beagle
4 2008-02-22 11:02
Re: PunBB 1.2.17 (69 replies, posted in News)
Ahoy there HMS Beagle.
How goes your voyage of discovery? Been to the Galapagos Islands again recently?
Ahoy matey
My voyage of discovery goes well, Thank you.
Beagle
5 2008-02-22 00:49
Re: PunBB 1.2.17 (69 replies, posted in News)
Thank you. Perhaps you should have pointed out that I was missing the reading part. I got ahead of myself, which is usually the root cause of my self inflicted distress.
thanks again
Beagle
6 2008-02-22 00:27
Re: PunBB 1.2.17 (69 replies, posted in News)
I have installed the changed files, yet my version number still says "1.2.16". Have I missed a file?
Beagle
7 2008-01-28 14:05
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Thank you very much! It works great.
Really, thanks for your time.
Beagle
8 2008-01-28 03:05
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
No, it appears on every page except, admin.
Beagle
9 2008-01-28 00:20
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
this is what i placed in the include folder.
I'm not sure if this is the file you meant.
And, thank you for your time, I imagine dealing with a noob can be frustrating.
Beagle
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>
<head>
<title>mp3 player</title>
</head>
<body>
<script type="text/javascript" src="http://www.mywebsite.com/forum/swfobject.js"></script>
<div id="player">Loading MP3 Player</div>
<script type="text/javascript">
var so = new SWFObject('http://www.mywebsite.com/forum/mod_mediaplayer.swf','mpl','600','75','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','75');
so.addVariable('width','600');
so.addVariable('file','http://www.mywebsite.com/forum/mp3/upload/statistics.xml');
so.addVariable('backcolor','0x009900');
so.addVariable('frontcolor','0xFFFF00');
so.addVariable('lightcolor','0x999999');
so.addVariable('displaywidth','140');
so.addVariable('showstop','true');
so.addVariable('showdownload','true');
so.write('player');
</script>
</body>
</html>
10 2008-01-27 23:14
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
what do you need to see?
Beagle
11 2008-01-27 22:30
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
yeah, I got that..lol
Beagle
12 2008-01-27 20:08
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I tried placing that code into "main.tpl". It shows the code as text with the player between the brackets.
Beagle
13 2008-01-27 20:03
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I've placed a file in the dir "include/user" named player.html. That calls a flash player via javascript.
and in "main.tpl" i've placed the string "<pun_include "player.html">"
between <pun_announcement> and <pun_main>
The player works perfectly.
Can i place the "<pun_include "player.html"> in the code you provided?
thanks for your help
Beagle
14 2008-01-27 19:40
Re: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
If it makes any difference, I have re-placed the player by using the pun_include function. The player is still visible to guests. I sort of understand the need for the if statement, I just have no idea where it should go.
thanks again
Beagle
15 2008-01-27 13:24
Topic: Mp3 player guest restriction (16 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I have searched and read numerous posts and could not find an answer. My apologies if I missed the info.
I have installed the easy video BB codes mod, and have installed the mp3 player, that all works just fine.
I placed the mp3 player code in the main.tpl file, it works fine., and shows where I want it.
The problem I'm having is the mp3 player also shows on the index page when not logged in or you are a guest. I dont want guests to be able to see it.
Is there a way to place it so only users logged in can see and use the player?
thanks in advance
Beagle