Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Announcement mod (www.snewstr.com)  (Read 1547 times)

volkanatabey

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 60
Announcement mod (www.snewstr.com)
« on: February 05, 2011, 01:29:29 PM »

« Last Edit: September 08, 2012, 01:30:39 PM by volkanatabey »
Logged

jesth

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 66
Re: Announcement mod (www.snewstr.com)
« Reply #1 on: February 05, 2011, 05:46:56 PM »

Hi. I appriciate your efforts, but could you please wrap your stuff in code tags, it would be alot easier, thanks again.
Logged

volkanatabey

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 60
Re: Announcement mod (www.snewstr.com)
« Reply #2 on: February 05, 2011, 06:39:07 PM »

Hi. I appriciate your efforts, but could you please wrap your stuff in code tags, it would be alot easier, thanks again.

 :-\
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Announcement mod (www.snewstr.com)
« Reply #3 on: February 05, 2011, 08:35:56 PM »

Volk, like that.  :P

In the forum editor, highlight the part to be wrapped, and use the # button on the bottom line of editor buttons.
Logged
Of all the things I have lost, it is my mind that I miss the most.

volkanatabey

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 60
Re: Announcement mod (www.snewstr.com)
« Reply #4 on: February 05, 2011, 11:00:39 PM »

Volk, like that.  :P

In the forum editor, highlight the part to be wrapped, and use the # button on the bottom line of editor buttons.


ok  ;) understand :)
Logged

Kiss

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
Re: Announcement mod (www.snewstr.com)
« Reply #5 on: March 10, 2011, 09:53:15 AM »

please post this announcement mod here & in english only,

please help guys

Thanks in advance,

Cheer's
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Announcement mod (www.snewstr.com)
« Reply #6 on: March 10, 2011, 03:40:42 PM »

The mod, as posted on Volkanataby's website, is in Turkish.
Here it is in English, with the Turkish words and references in the code also changed to English.

1. MySQL Database - Settings Table addition:
   Add this new setting string to the Settings table for your database. This setting will be added to your Admin Settings panel.
   a)  Run this as a query on the settings table in phpMyAdmin to add it to your existing database.
   b)  Add it to the script you used to create your database tables the first time, so that it is there for future use.
   INSERT INTO `settings` VALUES (39, announcement', '');

2. To the Language file (lang/EN.php):
   Add this new language variable wherever you want it.
   If you have more than one language file in use, add it to them too and translate the value as required.
   $l['announcement'] = 'Announcement message';

3. To the index.php file (template file):
   Search for the string that generates the Breadcrumbs on your web page:
   <div id="crumbs"><?php breadcrumbs(); ?></div>

   And below it, add this function-tag, which will display the Announcement under the Breadcrumbs:
   <?php duyuru(); ?>

4. In your css/style.css file:
   Search for: .subcatlist_div
   Add this under it:
   (do NOT copy the PHP-tags)
Code: [Select]
<?php

.announcement {
    
margin-bottom1px;
    
padding10px 10px 10px 100px;
    
border-bottom1px solid #ffffff;
    
border-top1px solid #ffffff;
    
color#444
}

.
announcement background#e2ecee url(../images/duyur.jpg) 2.2em center no-repeat; border-color: #9ddae6 }
.announcement  a color#2d7ba2 }

?>



The following modifications are all in the snews.php file.

5. Search for: // LOGIN LOGOUT LINK function.
   Add this new function under that function.
   (do NOT copy the PHP-tags)
Code: [Select]
<?php

// ANNOUNCEMENT
function announcement() {
echo '<div class="announcement"><marquee>'.s('announcement').'</marquee></div>';
}

?>


6. Search for: echo html_input('text', 'website_keywords',
   This is the string in the Settings function that generates the four existing setting fields in the Admin Settings panel.
   Below it, add this new string for the Announcement setting:
   (do NOT copy the PHP-tags)
Code: [Select]
<?php

echo html_input('text''announcement''announcement's('announcement'), l('announcement'), '''''''''''''''''''');

?>


7. Search for: $date_format = $_POST['date_format']; - which is in the PROCESSING function.
   Add this string below it:
   $announcement = $_POST['announcement'];

   Search for: 'date_format' => $date_format,
   Add this string below it:
   'announcement' => $announcement,

8. The Announcement Icon Image:
   In the CSS (see Step 4 above), you will see that a background image is used.
   You can make up your unique image and add it to your images folder.
   OR... you can copy or download the Icon Image on Volkanataby's Website.

   Notice that Volkanatably's image is named duyur.jpg.
   "duyur" is the Turkish word for "announcement".
   You can change the name of your image to "announcement".
   If you do, be sure to change the file-name in the CSS background URL to match it.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

roie

  • Newbie
  • *
  • Karma: 1
  • Posts: 32
Re: Announcement mod (www.snewstr.com)
« Reply #7 on: May 05, 2011, 10:03:53 PM »

The original link seems to be broken ATM...
Logged

volkanatabey

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 60
Re: Announcement mod (www.snewstr.com)
« Reply #8 on: September 08, 2012, 01:30:55 PM »

Logged