Yet Another Global Announcements Mod (YAGAM)

Started by Nibogo, February 11, 2009, 12:47:15 AM

Previous topic - Next topic

Verso

I've just installed this and its ******ed up my forum!!!!!

It's all gone white


sattninja

exactly

hope you have a backup if you do just ftp it up to the server it is something in one of the .subs file that this mod alters it installs with no errors then your site is gone


NICE!!!!!
Running Rc4

applecheescake

i get this come up on my forum: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/boosh80/public_html/SSI.php  on line 2076 what can i do to sort it?

Vyache

Conflicts with SimplePortal on my forum. I get a white page after installing these two mods together.

AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

Nibogo

For people with the blank page please open SSI.php:

Search for:

global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', "
SELECT
title, id_announcement


Replace with:

global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', '
SELECT
title, id_announcement


I'm adding additional Curve support for YAGAM and this fix plus some new things will be released today

akbora

I was using the mod successfully but I start to use with RC2 but some problems appears. Also blank page.

Let me try again. Thanks
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

applecheescake

sorted... cheers!!

applecheescake

with the ./Sources/Admin.php file i found that this
      'announcements' => array(
'label' => $txt['yagam_admin'],
'file' => 'Announcements.php',
'function' => 'AnnouncementsMain',
'custom_url' => $scripturl . '?action=admin;area=announcements;sa=admin;sesc=' . $sc,
'icon' => 'yagam.gif',
                    'subsections' => array(
    'admin' => array($txt['yagam_admin'], 'admin_forum'),
    'add' => array($txt['yagam_admin_add'], 'admin_forum'),
                                            'settings' => array($txt['yagam_admin_settings'], 'admin_forum'),
                                            'version' => array($txt['yagam_version'], 'admin_forum'),
),
),
'postsettings' => array(
'label' => $txt['manageposts'],
'file' => 'ManagePosts.php',
'function' => 'ManagePostSettings',

caused an error, but removing the 'postsettings' => array(
'label' => $txt['manageposts'],
'file' => 'ManagePosts.php',
'function' => 'ManagePostSettings',
enabled it to work freely.

i just thought i'd let others know that any admin.php errors could be caused by this

Nibogo

YAGAM v2.5 Released. In this release you can't see all the changes but the mod has been totally optimized specially in the installation script and in the Announcements.php file. For all the changes in the code, the little new features and the new installation script 2.5 is a Big Upgrade.

Changelog:


Version 2.5 (Big Upgrade) - Jan 08, 2010
- Added Additional Curve Support viewing an Announcement (Now we have corners like Curve).
- Little tweaks to the Add Comment Form, Now everything is centered, added support for shortcuts and the Add Comment button now has a better style.
- Added Comments Pages.
- Added option to convert comments into replies in the Make Topic Page.
- Modded all the Installation Script now added Support for PostgreSQL and SQLite plus now using the SMF 2.0 Standards and fixed a bug loading the Curve Stylesheet.
- Added a new checkbox to easily select all the membergroups when we are adding/editing announcements.
- Changed a lot of queries.
- Changed some codes to make the mod a little bit faster and most importantly with a better semanthic.
- Now when you delete an announcement, the comments and log of this announcements in deleted too.
- Fixed fatal error in the SSI.php Edit.
- Fixed missed space in the MessageIndex on Announcements Comments.
- Fixed additional bugs with the Comments as Regular Posts.
- The Announcement Log is Back now loading the users posts and now it comes with the Curve Style.
- Updated the YAGAM Version Page.

social

Great mod, but i have an error have if i can help you here of the file SSI.PHP

Fatal error: Cannot redeclare ssi_announcement() (previously declared in /home/turedsoc/public_html/SSI.php:2050) in /home/turedsoc/public_html/SSI.php on line 2199

Having if i say what the problem is here to continue learning
SMF v2.0RC2 ==>>Simple Portal v2.3.1
WWW.TUREDSOCIALPR.COM


Vyache


AjaxChat - SMF 2.0 RC2 Edition Download.
mrtrc266 ~AJAX Chat Intergration FAQ's & Tips-N-Tricks~


applecheescake

Quote from: social on January 09, 2010, 08:07:41 AM
Great mod, but i have an error have if i can help you here of the file SSI.PHP

Fatal error: Cannot redeclare ssi_announcement() (previously declared in /home/turedsoc/public_html/SSI.php:2050) in /home/turedsoc/public_html/SSI.php on line 2199

Having if i say what the problem is here to continue learning

check the code you see on line 2199 and check it on line 2050... it'll be the same, so all you have to do is remove ALL of the duplicate code

social

line 2049 this ==> // YAGAM SSI Function
line 2050 this==>  function ssi_announcement($announcement = null)

Fatal error: Cannot redeclare ssi_random_announcement() (previously declared in /home/turedsoc/public_html/SSI.php:2117) in /home/turedsoc/public_html/SSI.php on line 2159

Look the Picture
SMF v2.0RC2 ==>>Simple Portal v2.3.1
WWW.TUREDSOCIALPR.COM

social

Thanks friend, 130860 helped me with the problem, so that problem solved.

THANKS  NIBOGO... THIS MOD IS FANTASTY !!! Thanks
SMF v2.0RC2 ==>>Simple Portal v2.3.1
WWW.TUREDSOCIALPR.COM

akbora

SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

social

ok. Check This.

Quote from: NIBOGO on January 08, 2010, 12:47:39 PM
For people with the blank page please open SSI.php:

Search for:

global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', "
SELECT
title, id_announcement


Replace with:

global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', '
SELECT
title, id_announcement


I'm adding additional Curve support for YAGAM and this fix plus some new things will be released today

or Try This

Quote from: 130860 on January 09, 2010, 10:30:56 PM
mira, busca esto:

function ssi_announcement($announcement = null)
{
global $scripturl, $smcFunc, $txt, $settings, $modSettings, $context;

loadLanguage('Stats');

if ($announcement !== null)
$announcement = (int) $announcement;
elseif (isset($_GET['aid']))
$announcement = (int) $_GET['aid'];

$request = $smcFunc['db_query']('', '
SELECT
a.title, a.content, a.author, a.date, mem.id_member, mem.member_name
FROM {db_prefix}announcements AS a
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = a.author)
WHERE a.id_announcement = {int:announcement_id}',
array(
    'announcement_id' => $announcement,
)
);
$return = array();

if ($smcFunc['db_num_rows']($request) == 0)
{
die($txt['smf_news_error2']);
}

$row = $smcFunc['db_fetch_assoc']($request);

censorText($row['title']);
censorText($row['content']);

$global[] = array(
'title' => '<a href="' . $scripturl . '?action=announcements;aid=' . $announcement . '">'.$row['title'].'</A>',
'date' => timeformat($row['date']),
'content' => $row['content'],
'link' => ''.$txt['read_more'].'</a>',
'poster' => array(
'id' => $row['author'],
'name' => $row['member_name'],
'href' => !empty($row['author']) ? $scripturl . '?action=profile;u=' . $row['author'] : '',
'link' => !empty($row['author']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['author'] . '">' . $row['member_name'] . '</a>' : $row['member_name']
),
  );
$smcFunc['db_free_result']($request);

foreach ($global as $global_announcement)
echo '<table border="0" width="100%" align="center" class="smfNews">
<tr>
<td><b>', $global_announcement['title'], '</b><span class="smaller"><br />', $global_announcement['date'], ' '.$txt['by'].' ', $global_announcement['poster']['link'], '<br /><br /></span>
</td>
</tr>
<tr>
<td>', $global_announcement['content'], '<br /><br />
</td>
</tr>
<tr>
<td>', $global_announcement['link'], '
</td>
</tr>
</table>';
}



and this:


function ssi_random_announcement()
{
   global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', '
SELECT
title, id_announcement
FROM {db_prefix}announcements
WHERE enable = {int:is_approved}
ORDER BY RAND()',
array(
   'is_approved' => 1,
)
);

$row = $smcFunc['db_fetch_assoc']($request);
censorText($row['title']);
    $row['title'] = '<a href="' . $scripturl . '?action=announcements;aid=' . $row['id_announcement'] . '">'.$row['title'].'</a>';
$smcFunc['db_free_result']($request);
echo $row['title'];
}



These are the two functions that were repeated

These were my problem
SMF v2.0RC2 ==>>Simple Portal v2.3.1
WWW.TUREDSOCIALPR.COM

tanshin

Hi there, not sure if this has been asked/or I'm being totally ignorant but... is there a way to make an existing topic an announcement?

Advertisement: