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

ACP Announcement Centre

.MODS Module Menu - ACP Announcement Centre

.MODS Module Menu

by moot » Wed Mar 16, 2011 10:44 pm

I had to manually fix a MOD after Auto Update to 3.08 failed. Seems I have everything working again - except -
on the left side of the .MODS page where the MOD is listed. The MOD name is the correct font weight but the links underneath are to big and run off the right side of the frame.

MOD snap.jpg


What file(s)/line(s) do I need to edit to fix that :?:
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by lefty74 » Thu Mar 17, 2011 9:23 pm

i'd recommend to re-upload the language files of the mod.
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: .MODS Module Menu

by moot » Fri Mar 18, 2011 3:37 am

lefty74 wrote:i'd recommend to re-upload the language files of the mod.


At the risk of sounding dense... what 'language files' would I be looking for?
I edited:

/language/en/common.php
/language/en/acp/common.php

with the code that came with the MOD... those appear to be the only files in the language folder that are modified by Centre.

:?

I am using Firefox with the Firebug add-on to try and trace the code elements and so far it appears that it may be something in a .css that is supposed to handle the font weight, etc for that section of code.

I'll keep looking, I was just hoping someone would know the finer points of the whole picture...
Another thing I ran across is in the ACP... if I do the following:

Open ACP index
Click the System tab
under Module Management
Click ACP_ANNOUNCEMENTS_CENTRE
Select a module: ACP_ANNOUNCEMENTS_CENTRE
Click ACP_ANNOUNCEMENTS_CENTRE link

the following will be displayed:

ACP -> .MODs -> ACP_ANNOUNCEMENTS_CENTRE -> ACP_ANNOUNCEMENTS_CENTRE [Edit | Delete | Disable]

I then click the Edit link.

Under General options I see:
Module language name: ACP_ANNOUNCEMENT_CENTRE
Enter the displayed module name.
Use language constant if name is served from language file.

I almost seems like that is what is used for the display name on the ACP .MODS menu... but is it only a trap! ;) Sounds to simple...

It would be nice if someone that KNOWS about the ACP code could chime in and shed some light on this... ok, it is only a matter of 'making it look nice' ... maybe I'm wasting my resources on this...
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by lefty74 » Fri Mar 18, 2011 7:17 pm

Hi, what i meant was download the mod, and upload the language files from that mod to your server like in these installation instructions:

Code: Select all

File copy

   8.

      Copy: root/language/en/mods/announcement_centre.php
          To: language/en/mods/announcement_centre.php

   9.

      Copy: root/language/en/mods/info_acp_announcement_centre.php
          To: language/en/mods/info_acp_announcement_centre.php

  10.

      Copy: root/language/en/mods/info_mcp_announce.php
          To: language/en/mods/info_mcp_announce.php

  11.

      Copy: root/language/en/mods/permissions_announcement_centre.php
          To: language/en/mods/permissions_announcement_centre.php

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: .MODS Module Menu

by moot » Sat Mar 19, 2011 2:26 pm

lefty74 wrote:Hi, what i meant was download the mod, and upload the language files...


Those files and the files on the server are identical... I used WinDiff to verify.

FireBug inspection shows that admin.css is responsible for the style in the menu section. Everything points to #menu around line 457 in the admin.css

The reason the menu item display name over runs the right side of the menu area is the the text content is just to long. When you are hovering over the menu item this is the CSS Path when the ACP_ANNOUNCEMENTS_CENTRE is the active menu item:

html body.ltr div#wrap div#page-body div#acp div.panel div#content div#menu ul li#activemenu a span

I am convinced the only problem is that the length of the text... and the only way to fix it is to find out where the <TextNode textContent = "ACP_ANNOUNCEMENTS_CENTRE" is being set and change it to "Announcement Centre". Then change "ACP_ANNOUNCEMENTS_CENTRE_CONFIG" to "Announce Config" (or "Configuration", or anything 22 chars or less). The key is to just change the text context, i.e., display name!

I am not an expert in .php (nor .html for that matter) but can find myself around and am trying very hard to learn the syntax. I am struggling to find my way around and don't want to go in like a 'bull in a china shop' destroying something that is working :?

I'll be searching for that file... guess I'll start with the acp_*.php files... unless you can ease my pain and tell me where that may be defined ;)

oh, and thanks for taking the time to respond!
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by moot » Sat Mar 19, 2011 2:47 pm

moot wrote:I'll be searching for that file... guess I'll start with the acp_*.php files...


I looked at includes/acp/acp_announcements_centre.php and found:

case 'announcements':
$title = 'ACP_ANNOUNCEMENTS_CENTRE';
$this->page_title = $user->lang[$title];
$this->tpl_name = 'acp_announcement_centre';
$this->announcements();
break;

default:
$title = 'ACP_ANNOUNCEMENTS_CENTRE_CONFIG';
$this->page_title = $user->lang[$title];
$this->tpl_name = 'acp_announcement_centre';
$this->configuration();
break;

Am I on the right track? Could I change $title without breaking this MOD?
There is still something amiss in the style sheet format but just shortening the name is a workaround.
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by lefty74 » Sat Mar 19, 2011 8:59 pm

I don't understand why you would need to shorten it, the length has, as far as i know, never caused an issue.

i can have a look if you like but would need a temp admin account with rights to the announcemnt center tabs and a temp ftp account.
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: .MODS Module Menu

by moot » Sun Mar 20, 2011 12:34 pm

lefty74 wrote:I don't understand why you would need to shorten it, the length has, as far as i know, never caused an issue.


Please look at this link:

http://www.phpbb.com/community/download/file.php?id=133395&mode=view

It is from post by ConcordRidge » Wed May 05, 2010 2:14 pm
The reply from by iftitaj » Wed May 05, 2010 3:10 pm
There is language file problem with your installation of this MOD. There shouldn't be ACP_ANNOUNCEMENTS_CENTER, instead a proper written text.

hints at the same problem area, a language file... but also considers a 'written text'/display text issue.

I will look into creating temporary accounts. Because of various security layers it may take time.
Until then can you say if changing that $title data value would have deleterious effects on the rest of the MOD?
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by lefty74 » Sun Mar 20, 2011 9:38 pm

i still think it's the info_acp_announcement_centre.php file. as such i would recommend not to mess with any of the code.
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: .MODS Module Menu

by moot » Sun Mar 20, 2011 11:34 pm

lefty74 wrote:i still think it's the info_acp_announcement_centre.php file. as such i would recommend not to mess with any of the code.


Thank you... that is the file that was missing... don't know why or how... and it looks like it is the one that sets the display name... whatever... Thank you again...

I know I checked that file ( I have it in the temp folder that I use for WinDiff, Original and Active files) - BUT - I don't think it was in that directory (/language/en/mods) on the server... going to search now...

ok... it was in the /store/... and never made it to the proper folder... :oops: my bad...
You can lead a horse to water...but you can't make 'em think.
User avatar
moot
Registered User
Posts: 100
Joined: Sat Sep 15, 2007 11:57 pm

Re: .MODS Module Menu

by lefty74 » Mon Mar 21, 2011 9:22 pm

as long as it works now ;)
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: