Log in

View Full Version : Private Messages Enhancements - ragtek contact pm


ragtek
05-01-2009, 10:00 PM
This Add-on adds the contacts from the user to the new pm form.


Installation:
Install the xml, if you don't have installed tms, make this:
Search in pm_newpm template for:

<tr>
<td>
<if condition="$show['sendmax']"><div><phrase 1="$permissions[pmsendmax]">$vbphrase[may_send_to_x_people]</phrase></div></if>
<if condition="$show['sendmultiple']"><div>$vbphrase[separate_multiple_names]</div></if>
</td>
</tr>
</table>
</fieldset>
<!-- / recipients field -->

Add above

<if condition="$show[rag_contacts]">
<tr>
<td>
<table width="100%">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('rag_pmfriends')"><img id="collapseimg_rag_pmfriends" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_rag_pmfriends].gif" alt="" border="0" /></a>
$vbphrase[contacts]
</td>
</tr>
</thead>
<tbody id="collapseobj_rag_pmfriends" style="$vbcollapse[collapseobj_rag_pmfriends]">
<tr><td><table>
$rag_friends
</table></td></tr>
</tbody>
</table>
</td>
</tr>
<script type="text/javascript">
toggle_collapse('rag_pmfriends');
</script></if>

BUT ONLY IF YOU DON'T HAVE INSTALLED TMS!!!

htscpl
05-02-2009, 09:39 AM
Whoohoo first post -- installed **

Looks great, checking it out now.

Just one question, can it be made to list the contacts across the table in columns instead of down one row. I have lots of contacts and it makes for a long page.

mystikmedia
05-02-2009, 10:49 AM
I agree with htscpl's post. It should use more than one column if more than about 5 contacts.

ragtek
05-02-2009, 02:13 PM
I'll try to implement it.

Lionel
05-02-2009, 03:41 PM
:up: Very useful. Thanks very much.

vbboarder
05-02-2009, 07:59 PM
Can you put the contacts in a dropdown list using the vBmenu script instead of a collapsible table? That way, the contacts list won't take up lots of space and you don't have to code for multiple table columns.

Lionel
05-02-2009, 08:31 PM
I implemented the contacts in 3 columns. If it's ok with ragtek, I'll post my changes.

ragtek
05-03-2009, 04:32 AM
hi
yes it is ok:)

my prob is the building of the table
for example if there are 10 contacts and you have 3 columns there are 3 lines with 3 values and one columtn with 1 value. but this should have a colspan of 3, so that the tablehtml is right
how have you solved this?*g*

ragtek
05-03-2009, 07:04 AM
With help of andreas i solved the prob with the columns and colspan in 1.0.3.
Here you have now 3 columns

Lionel
05-03-2009, 09:18 AM
Here you go. My method is different than Andreas. By default it's 3 columns. That can be changed in vboptions.

ragtek
05-03-2009, 09:25 AM
thx 4 sharing:)

I think its a good idea to let the admin choose how many columns he want.

Updated^^

chrissmith
05-03-2009, 11:14 AM
nice !!!

thanks for release that ;)

TAIFUN_T
05-03-2009, 09:41 PM
Nice hack ;)

Sunka
05-04-2009, 12:31 AM
Working good. Installed!

htscpl
05-04-2009, 09:18 AM
Just installed the update and I want give out a great big thanks to Lionel and Ragtek for the column fix. Looks great !

Sunka
05-05-2009, 06:37 PM
Lol...I am little confused!
Is this MOD change name?

Ragtek Contact PM
or
Ragtek Friends PM

ragtek
05-05-2009, 06:46 PM
you're true

i haven't choosn the right names
but as i made friends pm, i had no idea that i would make something like this one(contact pm^^)

DobieGillis?
05-05-2009, 07:13 PM
Nice mod! Installed!

students_forum
05-07-2009, 07:35 PM
Thanks for this, it works nicely on 3.7

ragtek
05-11-2009, 01:13 PM
Thanks for this, it works nicely on 3.7

thx 4 feedback

goxy63
05-17-2009, 03:46 PM
Cool hack
just installed
Thanks

Lionel
05-23-2009, 07:01 PM
there seem to be a bug when you click on Go Advanced. Since there are no $_POST['rag_recipients']

foreach ($_POST['rag_recipients'] AS $rag_recipient)

you get an error.

So I made the plugin

if ($_POST['do'] == 'insertpm' AND $_POST['rag_recipients'])

ragtek
05-24-2009, 03:01 PM
thx
i'll correct it for the next version

ragtek
05-24-2009, 03:38 PM
there seem to be a bug when you click on Go Advanced. Since there are no $_POST['rag_recipients']

foreach ($_POST['rag_recipients'] AS $rag_recipient)

you get an error.

So I made the plugin
I don't understand what you mean, sorry.

That's allready in the plugin! Or do you mean something other?

<?php
// title: set recipients
// code:
if ($_POST['do'] == 'insertpm' AND $_POST['rag_recipients'])
{
foreach ($_POST['rag_recipients'] AS $rag_recipient)
{
$string_rec .= $rag_recipient . '; ';
}
if ($_POST['recipients'] != '')
{
$_POST['recipients'] = $_POST['recipients'] . '; ' . $string_rec;
}
else
{
$_POST['recipients'] = $string_rec;
}
}

?>

Lionel
05-24-2009, 06:07 PM
Ah ok ... I was using original version

if ($_POST['do'] == 'insertpm')
{
foreach ($_POST['rag_recipients'] AS $rag_recipient)

TAIFUN_T
06-25-2009, 08:57 AM
Hi, ragtek

When i looke my forum in archive version, i see this error message
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 155

alsultan88
08-01-2009, 12:41 AM
thnxxxxxx
good work i try it on 3.8.1

Mike-D
08-01-2009, 10:18 AM
Great and wonderful job, Ragga https://vborg.vbsupport.ru/external/2011/01/19.gif Installed & Nominated for sure ;) Fits well and works well too :D

German:
Super Arbeit, Daniel https://vborg.vbsupport.ru/external/2011/01/19.gif Installiert & Nominiert Hervorragende Arbeit wie immer ;) Passt, sitzt und hat Luft :D