Forums / Cotonti / Support / PM Title View

badsey
#1 2010-10-16 16:58
Hi all,

I need some help, I want to put it so when a user has a new message they can see the title and who it is from without going to the pm.php page. i tried to code it myself and nothing happened,

		if (!$cfg['pm_view'])
		{
			if ($usr['viewpm'])
			{
				$sqlpm = sed_sql_query("SELECT (*) FROM $db_pm ORDER BY `sed_pm`.`pm_id` DESC, `$db_pm`.`pm_title` DESC, `$db_pm`.`pm_fromuser` DESC");
				$usr['viewmessages'] = sed_sql_result($sqlpm,0,'');
			}
			$out['pmmessageview'] .= ($usr['viewmessages']>0);
		}

coding php is my weakes point, so any help would be brilliant :)
MIHDev
#2 2010-10-19 20:51
Sounds like a great idea.

Lets isolate what it is you are trying to do and then provide you with the areas which you could modify to do it.

From my understanding you wish to do the following.

Requirement
1. Display the Sender of the 'New' message in a specified location. (Where?, In the Header?)

Options
1. You could use an index plugin or core modification to do this depending on where you want to show it.

If you can clarify these points then I will do my best to help you isolate the area for modification or plugging-in.

Regards

CCCDev
[b]Know the question and you will be far more likely to get an answer.[/b]
GHengeveld
#3 2010-10-19 21:00
Best to make this a plugin, I suggest using the ajax hook and use javascript to get the new pm info.
Actually I'm planning to include a facebook-style PM system in the next version of cotonti.com (work in progress), including a popup window at the top of the page which displays the title (etc) if there's a new pm.
esclkm
#4 2010-10-19 21:12
Koradhil also try siena pm (may be after modularization it has some bugs - but I thint it i something between facebook and gmail
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
badsey
#5 2010-10-19 23:46
# CCCDev : Sounds like a great idea.

Lets isolate what it is you are trying to do and then provide you with the areas which you could modify to do it.

From my understanding you wish to do the following.

Requirement
1. Display the Sender of the 'New' message in a specified location. (Where?, In the Header?)

Options
1. You could use an index plugin or core modification to do this depending on where you want to show it.

If you can clarify these points then I will do my best to help you isolate the area for modification or plugging-in.

Regards

CCCDev

it would be placed in the header, as it would bee needed on all pages,

im happy with a core mod, already added a few things to it,

would be great for help :)
GHengeveld
#6 2010-10-20 00:57
Please try not to use core mods/hacks (aka. patches). There's a reason why we emphasize on modularity. Doing a hack will cause you major headaches when you upgrade your Cotonti.

@esclkm: Siena PM module has some issues. I like that it uses AJAX but the JS needs a rewrite.
MIHDev
#7 2010-10-20 04:51
I agree Koradhil, core mods are not great things :) especially with the highly modular structre of Cotonti. I have to get used to this new world of not going for core hacks like the old days before flexible modular systems were around :).

I am away at a conference tomorrow so I may have time during the intervals to do some ground-work.

Will keep you posted :)

Regards

CCCDev
[b]Know the question and you will be far more likely to get an answer.[/b]