News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

[Add New Holiday] button, on top of "Current Holidays" List, please

Started by fapencio, July 24, 2015, 03:26:11 PM

Previous topic - Next topic

fapencio

Hi, i need your help please, in: (Admin --> Forum --> Calendar... --> Manage Holidays) There is a button called "[Add New Holiday]", but this button is at the bottom of "Current Holidays" list, i want Add that button: "[Add New Holiday]" on top of "Current Holidays" List, something like this:



thanks in advance, sorry for my bad english, data of my forum in signature and profile :D
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Illori

Sources/ManageCalendar.php

Code (find) Select
'additional_rows' => array(
array(
'position' => 'below_table_data',
'value' => '
<a href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday" style="margin: 0 1em">[' . $txt['holidays_add'] . ']</a>
<input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" />',
'style' => 'text-align: right;',
),
),


Code (replace) Select
'additional_rows' => array(
array(
'position' => 'above_column_headers',
'value' => '<a class="button_submit" href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday">' .$txt['holidays_add']  '</a>',
'style' => 'text-align: right;',
),
array(
'position' => 'below_table_data',
'value' => '<input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" />',
'style' => 'text-align: right;',
),
),


also the above changes the text into a button.

fapencio

error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in   /Sources/ManageCalendar.php on line 151

help please :(
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Shambles

Attach that file to your next post so we can correct your edit, or

change

'value' => '<a class="button_submit" href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday">' .$txt['holidays_add']  '</a>',

to

'value' => '<a class="button_submit" href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday">' .$txt['holidays_add'] . '</a>',

fapencio

Thanks to @Illori and @Shambles for your help, the code works perfectly, my respect, thousand thanks

so, topic solved :)
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Advertisement: