• Welcome to Simple Machines Community Forum. Please login or sign up.
November 28, 2021, 06:17:48 PM

News:

Wondering if this will always be free?  See why free is better.


Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

king kratos

I haven't created a new form in a long time and just tried to do so last night. However, the Body portion of the output is posting nothing, as in empty, to the database.

I went directly to the database table and entered the output format I wanted and it worked just fine, but if I click the save button on the form edit section, it will overwrite the database with nothing (ie remove everything I had put in the database table).

I cannot seem to find the file that is saving this to the database to see if the code got messed up somehow. Any ideas?

Kratos

Raths Rants

Am sure you tried this already. Have you tried to reinstall the mod ?
The DDC Network
a lot of hard work goes into easy

bretttina

Hi

OK I have installed the mod on a test forum and have set up the configuration settings as this :

settings i have set as follows :

permissions : set to regular and global

title and text : i have left these blank

Form is set up as follows :

title : description

board : general discussion

message icon : cheesy

function : left

permissions : regular/global

subject : about me

redirect : board

forum output is listed like this :

{name} :

{age} :

{where i am} :

{about me} :

Now when i go to the category i want ie general discussion and hit the "new topic" button nothing is shown in the type in box???

what have i done wrong please?

Thanks

Brett
Available Business Domains

Raths Rants

The forms area has two levels of permissions. The first menu under the admin window and the permission under the form itself.

Below is the example of my feedback form. Only Registered Members can see the form.

Feedback Type: {feedback_type}

Feedback Reason: {feedback_reason}

Message Body: {feedback_body}

Reply: {feedback_reply}

Feedback: {feedback_temp}


Also are you setting up your questions right ? This was one of the first things I goofed up on. I included a few screenshots. If it is a permission issue this should fix it.

Your can access the Forms Area using this link setup. All your forms will be listed there.
http://yoursite/forumdirectory/forum/index.php?action=form;
The DDC Network
a lot of hard work goes into easy

bretttina

Thanks Raths Rants,

I have done this (please see attachments)

Also when i type in http://yoursite.com/forumdirectory/forum/index.php?action=form; i get nothing?????

so where have i gone wrong?
Available Business Domains

Raths Rants

February 10, 2014, 03:22:44 PM #1625 Last Edit: February 10, 2014, 03:34:59 PM by Raths Rants
You have to type in your site address.

I am guessing it should be this:
http://j0intventure.com/index.php?action=form;

I do not see your questions below. I know that if no questions are associated it will not submit an output.
The DDC Network
a lot of hard work goes into easy

bretttina

Yep did that but it's not on that forum it is on my test forum

is there anything wrong with what i have put in the screenshots?
Available Business Domains

Raths Rants

The DDC Network
a lot of hard work goes into easy

Raths Rants

All looks good except for the missing questions to associate with the output.
The DDC Network
a lot of hard work goes into easy

king kratos

Quote from: Raths Rants on February 08, 2014, 11:26:17 PM
Am sure you tried this already. Have you tried to reinstall the mod ?

I did reinstall the mod and it still isn't working correctly.

Kratos

bretttina

Hi all,

On the redirect board it states "View" as the option to click to take you to the form its self,

My question is : How do i change this to say "Post your advert" instead of "View"

Have a look at the screen shot

Thanks
Available Business Domains

Kindred

Well, for one, it would change every instance of the word... But I assume it would be in either the custom forms English file or the modifications.english.php file
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

s4ph1r3

Hi, I tried to install this mod on SMF2.0.6 but I get this error:
3. Execute Modification    ./Sources/Admin.php    Test failed
   1.    Add After    ./Sources/Admin.php    Test failed
   2.    Add After    ./Sources/Admin.php    Test successful
If I click on 1. it shows this:
Code: (Find)
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:

Code: (Add After)
//   Place the Custom Form Mod Link.
'customform' => array($txt['CustomForm_tabheader']),

I searched through the Admin.php file but was not able to find the line "Mod Authors for a...". Should I add the line manually and then add the code after it?

Kindred

If you can not find that line, then you have some major issues -- because that comment line is in every distributed copy of Admin.php and nothing should ever remove it.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

s4ph1r3

Ty for your reply Kindred, I searched through the entire Admin.php again and managed to find that line, it was behind a piece of code. I compared the file with mine (wich has only 4 or 5 mods installed) and moved the line directly below
'general' => array($txt['mods_cat_modifications_misc']),
in the 'modsettings' => array
The CustomForm mod installed without a problem so I hope that the line is in the right place now.

hazy261

hey

want to allow guests to submit a form, at the moment i have allowed them to view the forum but when i click the link to form page it just redirects me to the index page.
i have allowed guest access in the mod config page also

thanks in advance

hazy

suresh1983

Hi,

I have created a form using this mod, but the issue that I am facing is the topic is remaining blank.

I have created a form for self introduction with the below options

Name:
Organization:
Number of years of experience:
Description:

when the user posts details using the form, I want the topic in the forum (board) to show Name & Total years of experience.

Currently the topic after the form is posted is showing as blank.

Please suggest and help me on how to accomplish this.

Grindabit

July 29, 2014, 05:34:37 PM #1637 Last Edit: July 30, 2014, 02:12:16 AM by Grindabit
Hello everyone,

I searched everywhere for a post that explains how to make the 'New Topic' Button re-direct to the form you wish the user to use for posting in that forum. I found an old post here https://sites.google.com/a/balancegames.org/smf/mods/forms/new_topic [nofollow] that was originally written by  margarett in the Portuguese board over at SMF balance forums and translated to English by FragaCampos.

This solution did not work for me because I am using 2.0.6 version of SMF and that trick was for a different version. So, I modified the trick to work with my version and thought I would share how it is done and the code replacements for ver 2.0.6

Make sure to save a copy of your current messagesIndex.template.php file, so you can restore it if u mess up.

Go to the MessageIndex.template.php of your theme and find...
// Create the button set...
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
           }


Replace with:
// Create the button set...
        if ($context['current_board'] != 58)
        {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
         }
   else
   {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=form;n=4;submit;'. '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
        );
          }


Next, you will need to specify which board you want the 'New Topic' Button to re-direct from to the new form. To do this, find the following in the new code you just replaced:
// Create the button set...
        if ($context['current_board'] != 58)

Replace the 58 with the board number you want to re-direct from.

Now we will need to tell it what form to re-direct to for creating a new post in that forum. Once again, in the newly pasted code, find the following:
action=form;n=4;submit;
replace the 4 with the number of the form you wish to display.

Try it out! It should work, If it doesn't work, then you are using a different version than me.


See below how to modify any version.
(please excuse my lack of coding lingo, I am self taught and not very experienced yet)

All we are doing here is adding an if else statement and changing one action in the else section to call the action to the form instead of new topic.

In your  MessageIndex.template.php file under the theme you are using...
Find the function listed under the following heading:
//Create the button set...

Mine looked like this:
// Create the button set...
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
           }


Now add this statement before the array:
if ($context['current_board'] != 58)
Replacing the 58 with the board number you wish to re-direct from

It should look like this:
if ($context['current_board'] != 58)
        {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);


Next, add the following directly below what is in the code box above :
}
   else
   {


Now, copy and paste the original array again directly below the above pasted code:
to get  this:
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
           }
}
   else
   {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);

Now find the 'New Topic' array in section below the 'else' statement:
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
This is where we will change the action from, replace the action that looks like this post;board=' . $context['current_board'] with this form;n=4;submit;(replace the 4 with the form number u wish to re-direct to)

the finished product should look like this:
if ($context['current_board'] != 58)
        {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
         }
   else
   {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=form;n=4;submit;'. '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
        );
          }


I hope this helps! If it's not working for you, make sure to check for any missing } or ; , it's usually something that simple.

Also, If you want to use multiple forms for multiple boards, just copy and paste the entire script directly below the first one, then just change the board # and form #

*edited for correct spelling of margarett :D


margarett

* margarett finds his username misspelled :P

The original post by FragaCampos can be found in this topic, some pages behind ;) But yes, it was in long gone times of 1.1.something :) Nice update, thanks ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Grindabit

July 30, 2014, 10:20:06 PM #1639 Last Edit: July 30, 2014, 10:50:46 PM by Grindabit
SO i am trying to make forms for each board and was able to get two of them to work by just pasting the same code beneath the previous, but after the second one, things do not work. SO I tried this instead, But cannot make this work either. Can somone help point me in the right direction?

if ($context['current_board'] != 58)       
  {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=form;n=4;submit;'. '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
        );
          }
elseif ($context['current_board'] !=56)
  {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=form;n=5;submit;'. '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
        );
          }
elsif ($context['current_board'] !=25)
  {
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=form;n=6;submit;'. '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
        );
          }
else
{
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0', 'active' => true),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
         }

Advertisement: