[solved] Inactive users MOD -> enhanced version...

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
zhero2002
Registered User
Posts: 179
Joined: Mon May 20, 2002 9:33 am
Location: Between Italy and Austria

[solved] Inactive users MOD -> enhanced version...

Post by zhero2002 »

Hello, I'm trying to add a tiny modification to the Inactive Users Mod. But I'm unable to get it done to insert a link.

Feature I'm trying to add:
instead of listing the inactive users only I'm trying to add a link to each nickname pointing to the 'edit user page'. This would allow a quite fast deletion of inactive users.

Method:
I did modify the template of Inactive Users and now I have a clean looking and compact table listing all inactive users.

Problem:
the link to the 'edit user page' does not work. I've tryed to add the link inside the template by doing so:
<a href="./admin_users.php?mode=edit&u={users.USER_ID}"><b>{users.USER_NAME}</b></a>

or

<a href="{user_row.U_USERNAME}">{users.USER_NAME}</a>

or

<a href="{users.U_USERNAME}">{users.USER_NAME}</a>


None of this a href statements is working. As soon as I click onto the nickname I'm asked to log in again. Therefore there is a problem with the user session wich is not being passed through the link.

Here is the full template file I've made (by looking at other templates around). Is somebody able to fix the problem? I think the modded version of the MOD would be very usefull for everybody.

<h1>{L_PAGE_TITLE}</h1>

<P>{L_PAGE_DESCRIPTION}</p>

<table class="forumline" cellSpacing="1" cellPadding="4" align="center" border="0">
<tr>
<th class="thHead" noWrap align="middle" height="25"><span class="genmed">{L_USER_NAME}</span></th>
<th class="thHead" noWrap align="middle"><span class="genmed">{L_USER_EMAIL}:</span></th>
<th class="thHead" noWrap align="middle"><span class="genmed">{L_USER_ID}</span></th>
<th class="thHead" noWrap align="middle"><span class="genmed">{L_USER_REG_DATE}:</span></th>
</tr>
<!-- BEGIN users -->
<tr>
<td class="row1" align="left"><span class="genmed">
<!-- <a href="./admin_users.php?mode=edit&u={users.USER_ID}"><b>{users.USER_NAME}</b></a> -->

<!-- <a href="{user_row.U_USERNAME}">{users.USER_NAME}</a> -->
<a href="{users.U_USERNAME}">{users.USER_NAME}</a>

</span></td>
<td class="row1" align="middle"><span class="genmed"><a href="mailto:{users.USER_EMAIL}">{users.USER_EMAIL}</a></span></td>
<td class="row1" align="middle"><span class="genmed">{users.USER_ID}</span></td>
<td class="row1" align="middle"><span class="genmed">{users.USER_REGDATE}</span></td>
</tr>
<!-- END users -->
</table>


It would be great if somebody could fix this... thanks a lot!
Chris
Last edited by zhero2002 on Mon Oct 14, 2002 10:20 am, edited 1 time in total.
Night4554
Registered User
Posts: 99
Joined: Sun Apr 07, 2002 3:09 am

Post by Night4554 »

There is a mod called "delete users" that allows you to delete the users that have not registered and such
User avatar
zhero2002
Registered User
Posts: 179
Joined: Mon May 20, 2002 9:33 am
Location: Between Italy and Austria

Post by zhero2002 »

hi, thanks for your suggestion but I do already know this mod... but I'd prefer to use the Inactive User mod with this patch.... any help?

Cheers,
chris
zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Post by zemaj »

Heh. You can't just make a page from a template! The templates only display the php code in a certain way. Not that, that was writen correctly anyway (you've commented out stuff you need and got the table screwed up and links all stuffed).

But yeah. Not only is that entirely wrong, but you've got to do far more than that. I can whip up a quick mod which will do it for the memberlist if you want, but it will show up for all users, not just admins. Anything else would require php modification.

-zemaj
User avatar
zhero2002
Registered User
Posts: 179
Joined: Mon May 20, 2002 9:33 am
Location: Between Italy and Austria

Post by zhero2002 »

hi,

the stuff commented out in the template are just my tests to embed this link. Further, its not entirly wrong because the inactive users mod works fine with this template, and by using this table the list becomes more visibile. Table screwed up? Hemmm it appears exactly as it shoud be.

... but the link on the nickname I'm trying to add works only when a cookie is stored for the login data... and this is the major problem.

Yes I was thinking the same that there has to be modified something inside the php file to get the link working without cookies, too. Any idea how to do this? It would help me to know at least what I have to look for.

cheers,
chris
User avatar
zhero2002
Registered User
Posts: 179
Joined: Mon May 20, 2002 9:33 am
Location: Between Italy and Austria

Post by zhero2002 »

hello again,

I've a stupid but quite important problem. My forum is now moderated by a couple of nice people from Italy, but unfortunatelly they do not speak english.

Could you please tell me how to change the LINK inside the left frame of the admin interface?

The link says by default 'Inactive users' and I'd love to change it. Is somebody able to help me?

Thanks a lot!
Chris
User avatar
zhero2002
Registered User
Posts: 179
Joined: Mon May 20, 2002 9:33 am
Location: Between Italy and Austria

Post by zhero2002 »

typo
DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom »

You want the direct link mod to be installed. This makes each name a direct link. Admin (and supermods if you configure it as such) can click on the name and it will take you to the user profile admin.

Credit to the author below and not me.

Code: Select all

######################################################## 
## Mod Title:   Direct user link Mod 
## Mod Version: 1.0.2 
## Author:       Niels Chr. Rød Denmark < ncr@db9.dk > 
## 
## This mod is only phpBB2!! ver 2.0.0
##
## Makes the users name as a link when viewing topic's 
## that whay more intuitive to get users profile 
## if the viewing user have admin rigths then the link is to the 
## administration profile for that user 
## 
## 
## 
## Installation Level:  Easy 
## Installation Time:   2-3 Minutes 
## Files To Edit:      2 
##   phpBB2/viewtopic.php    
##   phpBB2/templates/template_dirXX/viewtopic_body.tpl    
##
######################################################## 
## 
## Installation Notes: 
## None 
######################################################## 


# 
#-----[ OPEN FILE ]------------------------------------------ 
# 
phpBB2/viewtopic.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
'U_MINI_POST' => $mini_post_url, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'U_VIEW_POSTER_PROFILE' => ($userdata['user_level'] != ADMIN)? append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $poster_id) : append_sid("admin/admin_users.$phpEx?mode=edit&u=" . $poster_id) , 

# 
#-----[ SAVE FILE ]------------------------------------------ 
# 
phpBB2/viewtopic.php 


# 
#-----[ OPEN FILE ]------------------------------------------ 
# 
#  (make sure to edit this file for every theme your board uses) 
phpBB2/templates/subsilver/viewtopic_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
<b>{postrow.POSTER_NAME}</b>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
<b><a href="{postrow.U_VIEW_POSTER_PROFILE}" class="name">{postrow.POSTER_NAME}</a></b>

# 
#-----[ SAVE FILE ]------------------------------------------ 
# 
phpBB2/templates/subsilver/viewtopic_body.tpl
Brandons
I am too lazy to register

Post by Brandons »

Moved to mod author support forum from mod dev
Post Reply

Return to “[2.0.x] MOD Writers Discussion”