Warning: The author of this contribution does not provide support for it anymore.

ACP Announcement Centre

Hi i need help wich a code - ACP Announcement Centre

Hi i need help wich a code

by aurquiel » Tue Mar 15, 2011 9:24 pm

I have a litell problem

This are the intruccions

Find

Code: Select all

'body' => 'posting_smilies.html')


Replace

Code: Select all

'body' => ( $acp_announce ) ? 'announcement_smilies.html' : 'posting_smilies.html')


But i install another mod and mi line is

Code: Select all

'body' => ( $acp_models ) ? 'models_smilies.html' : 'posting_smilies.html')


And

Find

Code: Select all

'U_MORE_SMILIES'       => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))


Remplace

Code: Select all

         'U_MORE_SMILIES'       => ( $acp_announce ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&announce=1') : append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))


But i install another mod and mi line is

Code: Select all

'U_MORE_SMILIES'       => ( $acp_models ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&models=1') : append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))


I soo noob wich the codes i need help

My web site for support http://www.cyber-house.org
User avatar
aurquiel
Registered User
Posts: 243
Joined: Fri May 15, 2009 1:45 am
Contact:

Re: Hi i need help wich a code

by lefty74 » Wed Mar 16, 2011 7:34 pm

can you please tell me where you got that other mod from? i'd like to take a look at the rest of the code usage of that mod.

for your question, try this (not tested)

Code: Select all

'body' => ( $acp_announce ) ? 'announcement_smilies.html' : ( $acp_models ) ? 'models_smilies.html' :'posting_smilies.html')



and this (not tested)

Code: Select all

        'U_MORE_SMILIES'       => ( $acp_announce ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&announce=1') : ( $acp_models ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&models=1') : append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: Hi i need help wich a code

by hywel » Tue Nov 15, 2011 11:22 am

lefty74 wrote:can you please tell me where you got that other mod from? i'd like to take a look at the rest of the code usage of that mod.

Hi lefty74, thanks for your MOD!
The code interfering with yours is the one from Post Models, whose author Elglobo has posted a workaround for conflicts between your two MODs.
I actually found another conflict with the Smilies Categories MOD, actually a small one (as Smilies Categories cuts off some code including the generate_pagination edit needed from your MOD).
By the way, here's how I managed to get the 3 MODs (ACP Announcement Centre, Post Models and Smilies Categories) working:
Partial find:

Code: Select all

function generate_smilies

Replace the whole preceding line with the following:

Code: Select all

function generate_smilies($mode, $forum_id, $acp_announce = false, $acp_models = false)

Partial find:

Code: Select all

'body' =>

Replace the whole preceding line with the following:

Code: Select all

'body' => ( $acp_announce ) ? 'announcement_smilies.html' : ( $acp_models ) ? 'models_smilies.html' :'posting_smilies.html')

Find:

Code: Select all

generate_pagination(append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id),

You won't find this code as it got removed by the Smilies Categories MOD.
Partial find:

Code: Select all

'U_MORE_SMILIES'

Replace the whole preceding line with the following:

Code: Select all

'U_MORE_SMILIES'       => ( $acp_announce ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&announce=1') : ( $acp_models ) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&models=1') : append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))

Those edits work fine to me.
Cheers
hywel
Registered User
Posts: 51
Joined: Mon Jul 12, 2010 12:53 pm
Contact: