News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Global Announcements

Started by JayBachatero, August 15, 2006, 02:39:18 PM

Previous topic - Next topic

gheybo

Thank you for that. I'll go find it out myself since I'm all new at this. Thanks >=]

BattleZone

I have the same thing...

the file is a .tar file...

and I'm unsure what to edit...either add in or remove...

TrueSatan

If you follow the directions I gave in my initial reply to gheybo you will find that that answers your query.

BattleZone

I've tried that...

the Modparser...comes up with an error when run through...so essentially pointless...

The document regarding manual installation of mods describes .xml and older files...which essentially is a reguler zip file...
which...the .tar file isn't...

1) I can't figure out how to "unzip" it...
2) I can't figure out WHAT to do...because normally you'd unzip and then follow the .xml files to figure out how to manually install...seeing as I can't unzip it...I have no idea what to edit...


TrueSatan

Your zip file is a kind of archive...there are many different kinds of archives and zip is only one such...several of these different kinds of archives work perfectly well to produce a mod package for SMF...there's nothing whatever wrong in using a .tar or a .tar.gz file. You merely need to use a different piece of software than whatever you use currently to unpack them if your current software doesn't support such archives.

I would suggest tugZIP http://www.tugzip.com/, IZarc [urlhttp://www.izarc.org/[/url], alZIP http://www.altools.net/ or Ultimate Zip http://www.ultimatezip.com/ as four excellent and entirely free products that would do the job perfectly well for you on the Windows platform...Linux handles such files natively.

You should then be able to proceed as normal.

fenyullow

I have a Chinese Forum running on 1.1 rc2. I got this mod installed by adding the string in modification.chinese.php, so it shows in the admin panel, however, it doesn't show any buttons when I click "Global Annoucement", see attached screenshot. Anything else I need to change?

Thanks

JayBachatero

1st thing first.  Why are you still running 1.1 RC2?  Should upgrade soon.

2nd you need to edit GlobalAnnouncements.englush.php for those strings.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

fenyullow

JayBachatero,

Yes, I'm trying to upgrade very soon, just want to fix a few things before that.

2nd, I added those strings into GlobalAnnouncementsAdmin.english.php, not GlobalAnnouncements.englush.php (which I couldn't find), however it still does the same thing.

The options (add/edit) show in the admin when I switch to the English language, and when I switch to another language, the 'Global Announcements" still shows under "Mod", but when I click it, it doesn't shows the buttons where I can add\edit\delete the annoucements.

thanks

JayBachatero

You need to translate the language strings in GlobalAnnouncementsAdmin.english.php into your language.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

chubbyboy

Is it possible to post reply to the global annoucement?

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

fenyullow

Quote from: JayBachatero on August 23, 2007, 09:53:55 AM
You need to translate the language strings in GlobalAnnouncementsAdmin.english.php into your language.

Thank you for the response. So here is what I did:

1, I translate all the strings in the GlobalAnnouncementsAdmin.english.php into Chinese
2, Overwrite the old one, but it still doesn't show the "Edit", "Add" and "Settings" tabs when I click the Global Announcement under Mod.
3, However if I switch the forum language to English, then I can see all the translated strings as  "Edit", "Add" and "Settings".

Is there anything I'm missing?
Thanks a lot.

TrueSatan

 You should leave the old english file alone and upload a new file Admin.chinese.php so that when you select English as your forum language the english file will be used and when you select Chinese the Chinese file will be used. You need to treat all the other english files for the mod the same way:

Modifications.english.php
Help.english.php
ManagePermissions.english.php
Errors.english.php

You probably already have Chinese versions of the above files but the code this mod puts into the English files needs to be translated to Chinese and applied to the Chinese files.

fenyullow

TrueSatan, thank, that  works.

Ok, now I have another question: it appears that if the board has a sub-board, the GA will be below the sub-board, is there anyway to move it to the top?

Thanks

slackerpunk

based on the download link it does not states if it works with 1.1.3

slackerpunk

ok I did test it my self and it works fine for me

fenyullow

Two more questions here:

1, it appears that if the board has a sub-board, the GA will be shown below the sub-board, is there anyway to move it to the top? Which file should I modify?

2, Which file should I change to change title of GA board to be another language. Please see attached screenshot. Now everything else is shown as another language except the title of GA board.
thanks

razorblitz07

Umm, I just created a Global Announcement (installed successfully) but the GA won't come up at the top of the forum sections.  Why is this?

Farmacija

Quote from: fenyullow on August 27, 2007, 10:26:55 AM

2, Which file should I change to change title of GA board to be another language. Please see attached screenshot. Now everything else is shown as another language except the title of GA board.
thanks
same question. i try on my own to find what should change, but i didn't have any result...
www.farmaceuti.com
www.farmaceuti.com/tekstovi

TrueSatan

To change the title of the GA to another language go to your MessageIndex.template.php file in each of your theme directories (supposing you use more than one theme) and find the followign block of code:


// Global Announcements...
if (isset($context['globalAnnouncements']) && count($context['globalAnnouncements']) != 0)
{
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>
<td colspan="7" class="titlebg">Global Announcements</td>
<tr>
<tr>
<td class="catbg3" width="9%" colspan="2"></td>
<td class="catbg3">', $txt[70], '</td>
<td class="catbg3" width="14%">', $txt[109], '</td>
<td class="catbg3" width="4%" align="center">', $txt[110], '</td>
<td class="catbg3" width="4%" align="center">', $txt[301], '</td>
<td class="catbg3" width="22%">Time</td>
</tr>';

// Loop through the Global Announcements
foreach ($context['globalAnnouncements'] as $globalAnnouncement)
{
echo '
<tr class="windowbg2">
<td align="center">
<img src="', $settings['images_url'], '/post/' .$globalAnnouncement['ga']['icon']. '.gif" alt="" />
</td>
<td align="center">
<img src="', $settings['images_url'], '/post/exclamation.gif" alt="" />
</td>
<td ' ,$globalAnnouncement['ga']['enabled'] == 0 ? 'style="background-color: #e9e9e9; color: #8d8d8d;"' : 'class="windowbg"', '>
<a href="' ,$globalAnnouncement['ga']['href'], '" >', $globalAnnouncement['ga']['subject'], '</a>
</td>
<td>
', $globalAnnouncement['member']['link'], '
</td>
<td align="center" class="windowbg">
--
</td>
<td align="center" class="windowbg">
', $globalAnnouncement['ga']['views'], '
</td>
<td>
', $globalAnnouncement['ga']['time'], '
</td>
</tr>';
}

echo '
</table>
</div><br />';
}


In that look at the line that says:

<td colspan="7" class="titlebg">Global Announcements</td>

...and that is what you have to change.

I'll leave the GA positioning query for Jay...

Advertisement: