Main Menu
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 log in.

Who's Online

  • Dot Guests: 1309
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

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!

Help PLease!

Started by allemand1, April 28, 2010, 10:20:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

allemand1

Hi, this is my problem.
I had created another funtion in Display.Template. and the problem is that, every time i use the variable "$message" it doesnt work.

Here an example:
Quotefunction template_x()
{
global $txt, $context, $modSettings, $message, $settings, $modSettings, $scripturl, $options;

echo ' <a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">Denunciar Topic!</a>';
}


The url that it creates is something like this:
http://localhost/?action=reporttm;topic=5.;msg=
But it dont put the number of the message id.

I use SMF 2.0 RC3

ccbtimewiz

$message is a temporary variable that contains the loop of messages from $context['get_messages']. Of course it wouldn't work in that case.

You could try using (isset($_GET['msg']) ? (int) $_GET['msg'] : 0) as the URL most likely provides the msg parameter.