[DISC] Advanced Private Messages - beta 0.0.7 (on hold)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
phpika
Registered User
Posts: 890
Joined: Fri Aug 09, 2002 10:31 am
Location: UK
Contact:

Post by phpika » Tue Dec 23, 2003 1:14 pm

Got all the other problems fixed, but this MOD seems to clash with the Random Logo for every Page MOD by Rondom http://www.rondom.gu2.info. In the "Topic review" section I get this error;
General Error

Couldn't obtain logo information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' -4996, -4998 )' at line 3

SELECT image FROM phpbb_logos WHERE page IN (, -4996, -4998 )

Line : 688
File : /home/srg/public_html/pikachu/forum/includes/page_header.php
And the code added for the Random Logo MOD in page_header.php is:

Code: Select all

// BEGIN: Random Logo for every Page by Rondom www.rondom.gu2.info
if ( !isset($userdata['session_page']) )
global $userdata;

if ( $forum_id ) {
// In wich cat is forum placed?
  $sql = "SELECT cat_id
     FROM " . FORUMS_TABLE . "
     WHERE forum_id = " . $forum_id;
  if (!$result = $db->sql_query($sql))
    message_die(GENERAL_ERROR, "Couldn't obtain logo information", '', __LINE__, __FILE__, $sql);
  $viewcat = $db->sql_fetchrow($result);
  $viewcat = $viewcat['cat_id'];
}

if ( $viewcat && $viewcat != -1 ) {
// Wich image for Cat?
  $sql = 'SELECT image
    FROM ' . LOGO_TABLE . '
    WHERE cat_id = ' . $viewcat . ' AND page = -4999';
  if (!$result = $db->sql_query($sql))
    message_die(GENERAL_ERROR, "Couldn't obtain logo information", '', __LINE__, __FILE__, $sql);
  srand((double)microtime()*1000000);
  $rnd_nr = rand(0,$db->sql_numrows($result)-1);
  $logo_img = ( $db->sql_numrows($result) ) ? $db->sql_fetchfield("image",$rnd_nr,$result) : '';
}

$where = PAGE_EVERYWHERE . ', ';
$where .= ( $userdata['session_page'] > 0 ) ? PAGE_ALLFORUMS : PAGE_ALLPAGES ;
$sql = 'SELECT image
FROM ' . LOGO_TABLE . '
WHERE page IN (' . $userdata['session_page'] . ', ' . $where . ' )';
if (!$result = $db->sql_query($sql))
message_die(GENERAL_ERROR, "Couldn't obtain logo information", '', __LINE__, __FILE__, $sql);
srand((double)microtime()*1000000);
$rnd_nr = rand(0,$db->sql_numrows($result)-1);
$rnd_img = ( $db->sql_numrows($result) ) ? $db->sql_fetchfield("image",$rnd_nr,$result) : '';
$logo_img = ( !$rnd_img ) ? $logo_img : $db->sql_fetchfield("image",$rnd_nr,$result);

$logo_img = ( $logo_img ) ? $images['logo_path'] . $logo_img : $images['default_logo'];
// END Random Logo for every Page by Rondom www.rondom.gu2.info
The Pika Club Website |pvpOnline|"I hope I didn't brain my damage" ~ Homer Simpson

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix » Tue Dec 23, 2003 1:33 pm

looks like the $userdata['session_page'] is not interpreted.

Are you sure this is no a problem with Random Logo MOD ? Because all the code given is from this MOD....
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Tue Dec 23, 2003 2:03 pm

That's not surprising : when you are in inline review, the page is equal to NULL. Rather than checking it > 0, check it isn't empty first, or use intval().

phpika
Registered User
Posts: 890
Joined: Fri Aug 09, 2002 10:31 am
Location: UK
Contact:

Post by phpika » Tue Dec 23, 2003 9:49 pm

Ptirhiik - RPGnet-fr wrote: That's not surprising : when you are in inline review, the page is equal to NULL. Rather than checking it > 0, check it isn't empty first, or use intval().
Uh....come again?
The Pika Club Website |pvpOnline|"I hope I didn't brain my damage" ~ Homer Simpson

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix » Tue Dec 23, 2003 9:58 pm

phpika wrote:
Ptirhiik - RPGnet-fr wrote:That's not surprising : when you are in inline review, the page is equal to NULL. Rather than checking it > 0, check it isn't empty first, or use intval().
Uh....come again?


he asks you to replace

Code: Select all

$where .= ( $userdata['session_page'] > 0 ) ? PAGE_ALLFORUMS : PAGE_ALLPAGES ;
by

Code: Select all

$where .= ( !empty($userdata['session_page']) ) ? PAGE_ALLFORUMS : PAGE_ALLPAGES ;
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post by A.I. BOT » Tue Dec 23, 2003 10:04 pm

can this work with PCP yet i came close but dident make it lol

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Tue Dec 30, 2003 9:59 pm

I was just looking for a mod to allow one to see the PM they are replying to and found this instead. I'm a little worried it's far more than I need, but it does look like it has some very nice features.

I have a number of mods that had me alter things in private messages. Should they still be compatible? If you are redirecting to a new PM.php how does that affect mods such as Cash Mod 2.2, Hidden posts, animated PM icon mod, etc.?
I'm probably wrong again...

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Dec 31, 2003 1:49 am

This will be simple : none will works or be applyable as-is, as this one is much more than a mod : it is a brand different way to manage the private message functionality. Even the tables are new. This was the key to allow the functionalities added in an efficient way, avoiding to burn the database with all the doubled pms.

sniperguy_j
Registered User
Posts: 42
Joined: Wed Dec 10, 2003 7:58 am
Contact:

Post by sniperguy_j » Thu Jan 08, 2004 11:26 pm

I have this mod installed and it works great... I love it....

but I was wondering if there is a way to set it up so I can use one of the "welcome pm to new user" mods with it? I know most of those mods use the original PM system... so I am just wondering if there is a way I can get it to work with the Advanced PM?

any ideas.... thanks
"Jesus is not the means to anything, Jesus is the ultimate goal to which every other means must lead."
-Pastor Larry Adams
www.ghccstudents.org
:::need Prayer?:::

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Fri Jan 09, 2004 3:17 am

Basicely the mod will remain the same, but you have to change the request to the emailer with the send_pm (or send_mail as you prefer) function. The sender id ($from_userdata['user_id']) 0 is supposed to figure the system, so you can use it as the sender of your welcome pm.

User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem » Fri Jan 09, 2004 10:48 pm

Well Ptirhiik - RPGnet-fr great job indeed again, a brand new mod with a lot of nice functionalities.

Even though I always love your work, I also must say, that all the big changes your mods always require to the scripts, for the average user who does not know or understand a lot of php language coding and whom is not a skilled programmer, especially if the user already has applied a number of other mods, it is nearly always so damn impossible to implement these big changes IF you don't want to lose all your other and already installed mods on your board.

Even though this is not a criticism in any way, and though your great work is always very appreicated, however, I believe that combining so many new functionalities in one big mod, makes old admins with a number of other mods already installed on their boards become very reluctant installing your mods, but in the same way, it does attract new board admins to install them, however, only to make future mod installations and script alterings even for them unfortunately nearly impossible.
:(

Anyway, still a big thx to ALL the hard work and support you put in. I hope you won't take what I just said on a personal level since it was never intended that way. I just wanted to share some personal thoughts which I have in common with some other older admins I know, we're all having the same problem, namely, we ALL love your mods, but we can not implement them on our boards because it would ruin like 50 other mod changes I'm afraid, since not too many of us out there using phpbb has enough coding experience or skills to know how to go about for not losing all other earlier script alterations..
:?

That said, please continue your great job even in the future. Personally I'm sorry I won't be able to install any of your mods anymore since it simply changes way too much of the original phpbb scripts. On the other hand, I might be totally wrong and maybe I am just being overall stupid.. in that case, I simply apologize and then please disregard this post.

Regards,
/Carpe Diem

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Fri Jan 09, 2004 11:04 pm

Let's just say my mods are not simple edition of the core code, but rewrite of it. In most case, quite all the real feature are covered (here mass pm, group pm, and planed for release auto-response and preferences mail/pm), sometime some more also (here icons in title). hum... How many else functionalities do you really need ? :) Also, the mod provides some client functions allowing more simply to generate mail/pm for integrations. That's just the way I do : I prefer having clean script and not bother of other mods (if they are well written, they will simply fit the new scripts, if not, well...) rather than going in small but dirty editing of the code. Who wants to use boards like phpbbfm ones ?

User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem » Fri Jan 09, 2004 11:41 pm

Ptirhiik - RPGnet-fr,

Well sure I understand your point, no one wants a badly written mod, we would all like to have clean, neat and multifunctional modifications with a lot of features at once and I don't think your great job is a problem at all; you feel like changing the whole script wherever in your opinion it lacks of the proper functionality or the correct settings, then that is indeed one good way of doing things.

However, the problem which I think so many other users trying to implement these big changes are facing is, that I believe most of us would like to also have some other mods installed as well! And I'm sure not all the mod writers out there are as skilled as you are when it comes to php coding, and that is just the problem and my point.
8O

Although your mods are impressively mighty and totally outstanding compared to most other stuff out there, still, simply because it DOES rewrite a lot of stuff from the scratch, it becomes TOO COMLICATED for the average user to use them as in combining them with other past or future alterations.

Again, that is not a criticisim, I'm just trying to share some thoughts with you from my own, and I'm sure from a great deal of other simple non-coder admins who would like to set up a simple board but still be able to use good mods. We are helplessly being amazed of and in the same time staring at your great work, but many times being unable to implement them because they indeed are too complicated, at least as long as they're not installed on a fresh new phpbb board.

What I'm trying to say is, that mabye a lot of us users are simply to stupid to be able to combine your great work with others. It does not take away any credit from you or your work, but maybe new mods SHOULD be written a little bit more according to the original phpbb scripts so that they are more or less compatible with others. Also, maybe other mod writers would be able to create more complex stuff by rewritting whole scripts, but just maybe, just maybe, they too, choose to go down a more narrow and "dirty" way to make their mods more compatible with other stuff. I don't know, don't ask me, I do not write mods so again, maybe I'm just being totally out of line here!
:?

Anyway, again, I would say great many thx for all your hard work.. Personally I would like to install ALL of your great mods. I'm just too sad when I know a lot of us can not use them. But we have ourselves to blame of course... I just wanted to share some thoughts as I know you always like to get different types of feedback to your work. I mean, it's like when installing one of your mods, usually the only future mods one can install would be other mods made by you and nobody elses.. poeple could have different point of view to that of course. Nevertheless, your work is impeccable.

Sorry for posting these here in your mod support thread. I just realized it probably was not such a good idea to do it in here. My humble apologies for that.

Cheers.
/Carpe Diem

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Sat Jan 10, 2004 12:39 am

Well, the choice I face is this one : I do dirty editing, slowing at max rate the board, overwriting standard way phpBB works and so corrupt the data, or I do a clean job, even if it is not the original script of phpBB. Your choice is to use or not the mod, that this simple.

The script is not more complicated or simplier - than what btw ? - it is just as it is. Do you really believe the functionalities would be fullfilled with keeping the core code ? This would be the result : a mass pm would generate twice the PM in the database, and would bump it to a size completly creazy regarding the data used. Here the duplication is reduced to the less amount, only the one required. Do you really believe it can be done with only adding "light" edition in the code ?

Can you figure what would be also the amount of the edition that would require the distribution of pm in customizable mail boxes ? Even making custom mail boxes ? Or the search in pm functionality ?

Believe me, even a single function would result in a wonderfull crap in privmsg.php, and btw wouldn't be stackable with other mods. Here we are talking about functionalities, not customization. You want the function, you want a board staying clean, this means you have to do the better choice for your board. As already told, you can consider phpbbfm being the definitive board, by my side I would qualify it with a word the censor would probably replace here :).

More generaly, I have some mods that required only editions (like ie sub-templates, qbar, simply merge, and so), they are not the most interesting ones btw.

A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post by A.I. BOT » Sat Jan 10, 2004 12:45 am

OMG Finally its for PCP good work Ptirhiik

Locked

Return to “[2.0.x] MODs in Development”