collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 376
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Quick PM v1.0.4.1  (Read 35336 times)

0 Members and 1 Guest are viewing this topic.

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Quick PM v1.0.3
« Reply #20 on: October 01, 2012, 12:06:38 PM »
small suggestion, maybe you can use $txt instead of 'hardcoded' text?

I'm using this code:
Code: [Select]
/**
Quick PM modification by Dr. Deejay
Module originally created for Dream Portal
Ported to SimplePortal by Dr. Deejay
Version 1.0.3
Thanks to: SoLoGHoST, SlammedDime, Labradoodle-360, Ccbtimewiz, Phantomm, Miss all Sunday and DoctorMalboro     
*/
global $txt, $buttons, $scripturl, $smcFunc, $context;


/*Config*/
$txt['quick_pm_block_not_allowed'] = 'You are not allowed to access this block';
$txt['quick_pm_block_default_user'] = 'Select user';
$txt['quick_pm_block_send'] = 'Send';



$query = $smcFunc['db_query']('', '
SELECT real_name, id_member
FROM {db_prefix}members
WHERE is_activated={int:activated}
ORDER BY real_name ASC',
array(
'activated' => 1,
)
);

$context['fastpm']['members'] = array();

while ($row = $smcFunc['db_fetch_assoc']($query))
{
$context['fastpm']['members'][$row['id_member']] = $row['real_name'];
}

$smcFunc['db_free_result']($query);

// Wait.. We DO have permissions for it, or don't we?
if (!allowedTo('pm_send'))
{
echo '',$txt['quick_pm_block_not_allowed'],'';
return;
}

// Are we allowed to view the memberlist? If yes, begin with the select box
echo '
<form action="#" method="post">
<select name="u" onchange="if (this.value) window.location.href=this.value">
<option value="0" selected="selected" disabled="disabled">',$txt['quick_pm_block_default_user'],'</option>';

foreach ($context['fastpm']['members'] as $key => $value)
echo '
<option value="', $scripturl, '?action=profile;u=', $key, '">', $value, '</option>';

echo ' </select>
<input type="submit" value="',$txt['quick_pm_block_send'],'">
</form>';

// If we submitted the form, redirect to the messages section
if(isset($_POST['u']))
redirectexit('action=pm;sa=send;u=' . $_POST['u']);
Would be better for new users, if they can translate strings in one place than searching it inside PHP code :)

Offline Kryzen

  • Localizer
  • Language
  • *
  • Posts: 826
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Quick PM v1.0.3
« Reply #21 on: October 01, 2012, 12:10:51 PM »
Thanks for the suggestion. :) Would you mind me using your code for a 1.0.4 release?

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Quick PM v1.0.3
« Reply #22 on: October 01, 2012, 12:12:36 PM »
yeah, you can use it :)

Offline Kryzen

  • Localizer
  • Language
  • *
  • Posts: 826
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Quick PM v1.0.3
« Reply #23 on: October 01, 2012, 12:13:36 PM »
Thank you, I'll release a 1.0.4 release within a few minutes. ;D

Offline Kryzen

  • Localizer
  • Language
  • *
  • Posts: 826
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Quick PM v1.0.4
« Reply #24 on: October 01, 2012, 12:16:05 PM »
1.0.4 released!
! Use $txt strings rather than hardcoded text (Thanks, Phantomm :))

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Quick PM v1.0.4
« Reply #25 on: October 02, 2012, 02:12:19 AM »
Strange behavior from 1.0.4...

When I select a persons name,  it automatically takes me to their profile... not allowing me to hit send to take me to a PM?


Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Quick PM v1.0.4
« Reply #26 on: October 02, 2012, 02:57:38 AM »
In block code:
Code: (Find) [Select]
<option value="', $scripturl, '?action=profile;u=', $key, '">', $value, '</option>';
Code: (Replace with) [Select]
<option value="', $scripturl, '?action=pm;sa=send;u=', $key, '">', $value, '</option>';
 :)

But then you don't need 'Send' button :)
« Last Edit: October 02, 2012, 03:09:59 AM by phantomm »

Offline boo2

  • Semi Newbie
  • *
  • Posts: 34
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Quick PM v1.0.2
« Reply #27 on: October 02, 2012, 02:07:42 PM »
Heres the errors in case someone takes an interest one day. I sure would like it to work with out errors, works with them but I'm always nervousness when I have errors in admin.

/index.php?action=admin;area=portalblocks;sa=edit
2: fclose() expects parameter 1 to be resource, boolean given
File: Sources/Subs-PortalAdmin.php Line: 401

 
/index.php?action=admin;area=portalblocks;sa=edit
2: fwrite() expects parameter 1 to be resource, boolean given
File: Sources/Subs-PortalAdmin.php Line: 400
 

/index.php?action=admin;area=portalblocks;sa=edit
2: fopen(public_html/sp_tmp_1349028364.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: Sources/Subs-PortalAdmin.php Line: 399
Weird, the code is not using fwrite, fopen or fclose, so I'll point the team to this topic. Thanks for the report, though. :)


I have no idea how to track a error like this. The only other block might be recent posts with preview. Thanks, hope the team can give me some clue as to where to look and what to look for.

Thanks for fixing the pm mod, I love this mod. Now it works perfect, goes right to the reply box with out the go button. Yippee! I'm keeping this for admin and mods, hopefully you'll create one for buddies one day..
Using SMF 2.0.2 and Simple portal 2.3.5

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Quick PM v1.0.4
« Reply #28 on: October 02, 2012, 05:57:25 PM »
In block code:
Code: (Find) [Select]
<option value="', $scripturl, '?action=profile;u=', $key, '">', $value, '</option>';
Code: (Replace with) [Select]
<option value="', $scripturl, '?action=pm;sa=send;u=', $key, '">', $value, '</option>';
 :)

But then you don't need 'Send' button :)

Works awesome... and send button removed.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Quick PM v1.0.4
« Reply #29 on: October 02, 2012, 06:16:41 PM »
boo2 -- In Subs-PortalAdmin.php, function sp_validate_php does open a file, write the code to be validated to the file, and then checks for the file. Those 3 error lines indicate that the function was unable to write to or close a file because the file was never opened. The third one says it was unable to open the file for writing.  This may be because of a permission problem, or for some other reason.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Kryzen

  • Localizer
  • Language
  • *
  • Posts: 826
  • Gender: Male
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Quick PM v1.0.4.1
« Reply #30 on: October 03, 2012, 05:46:25 AM »
I'm sorry, I must have been asleep when adding the url. :( It has been fixed now, thanks for the patch Phantomm. :).

In Subs-PortalAdmin.php, function sp_validate_php does open a file, write the code to be validated to the file, and then checks for the file.
Ah good to know, thanks for jumping in. :)

Offline boo2

  • Semi Newbie
  • *
  • Posts: 34
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Quick PM v1.0.4
« Reply #31 on: October 03, 2012, 01:19:05 PM »
boo2 -- In Subs-PortalAdmin.php, function sp_validate_php does open a file, write the code to be validated to the file, and then checks for the file. Those 3 error lines indicate that the function was unable to write to or close a file because the file was never opened. The third one says it was unable to open the file for writing.  This may be because of a permission problem, or for some other reason.

That went right over my head. lol Anyway which permissions, the one in the forums or the permissions on the server that I have to set and reset ever time I install with package manager?
Using SMF 2.0.2 and Simple portal 2.3.5

Offline Mu-So

  • Newbie
  • Posts: 3
  • Gender: Male
    • ein Forum für Musik und Musiker/A forum for music and musicians
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Quick PM v1.0.4.1
« Reply #32 on: September 16, 2013, 12:52:31 PM »
nice, thx

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Quick PM v1.0.4.1
« Reply #33 on: October 14, 2013, 04:39:37 PM »
boo2 -- the permissions on the server.  Just like you need permission set permissively enough to create files during mod installation, you need them set permissively enough to permit creating files when you use this feature.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?