Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: how to add sIFR code into sNews?  (Read 2036 times)

kenoodo

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
how to add sIFR code into sNews?
« on: December 19, 2007, 10:17:27 am »

Please help. I need to use a special font in the sNews. It seems there are template to code in other CMS, but there is no such folder in sNews.

And what I want is to use sIFR for tiltles and contents. Where should I begin with? snewsMU.php or index.php and style.css?

I have searched sifr in the forum, but there is no one post could help.

PS.  :-[ I know a little about coding.
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: how to add sIFR code into sNews?
« Reply #1 on: December 19, 2007, 10:25:05 am »

Mostly changes will have to be done in function center() at snewsMU.php. That's the place where main content area is generated. h1 is in index.php.

P.S. And at least for a year I've not noticed here significant discussions related to sIFR.
Logged

kenoodo

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: how to add sIFR code into sNews?
« Reply #2 on: December 19, 2007, 10:46:15 am »

Mostly changes will have to be done in function center() at snewsMU.php. That's the place where main content area is generated. h1 is in index.php.

P.S. And at least for a year I've not noticed here significant discussions related to sIFR.

Thanks codetwist.  :)

It is my turn now.
« Last Edit: December 19, 2007, 10:59:45 am by kenoodo »
Logged

kenoodo

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: how to add sIFR code into sNews?
« Reply #3 on: December 19, 2007, 01:28:06 pm »

Here is the sIFR Titles plugin for Wordpress
Quote
<?php
/*
Plugin Name: sIFR Titles
Version: 0.2
Plugin URI: http://www.august8th.com/blog/2006/05/04/sifr-wp-plugin-v01-flash-titles-plugin/
Author: John D Lund.
Author URI: http://www.august8th.com/blog
Description: Place code in your template to use Dynamic Flash files as your title for posts.
*/

   $width="523";
   $height="31";
   $bgc="#000000";

function sIFR_title(){
   global $id;
   global $width;
   global $height;
   global $bgc;
   //clean up title and url:
   
   $title = the_title('','',false);
   if (strpos($title, "&#038;") !== false){
      $title = str_replace("&#038;", "|ampersand|", $title);
   }
   $url = trackback_url(false);
   if (strpos($url, "&#038;") !== false){
      $url = str_replace("&#038;", "|ampersand|", $url);
   }
   // cleanup dine. it replaced all & with |ampersand| fo flash could accept them as variables... then flash will change them back with a custom str_replace()
   $divname = "post-".$id;
   
   echo "<div id=\"".$divname."\">\n";
   echo "<script type=\"text/javascript\">\n";
   echo "var so = new SWFObject(\"";
   echo bloginfo("template_url");
   echo '/title.swf?itemtitle=';
   echo $title;
   echo '&storylink=';
   echo $url;
   echo "\", \"".$divname."\", \"".$width."\", \"".$height."\", \"8\", \"".$bgc."\"); \n";
   echo "so.addParam(\"allowScriptAccess\", \"sameDomain\");\n";
   echo "so.addParam(\"quality\", \"high\"); \n";
   echo "so.addParam(\"wmode\", \"transparent\"); \n";
   echo "so.addParam(\"scale\", \"noscale\"); \n";
   echo "so.addParam(\"loop\", \"false\");  \n";
   echo "so.write(\"".$divname."\");  \n";
   echo "</script>  \n";
   echo "</div>\n";
}

?>

But it is nothing like sNews works. :'(
Logged

kenoodo

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: how to add sIFR code into sNews?
« Reply #4 on: December 19, 2007, 04:44:14 pm »

Seems like the index.php is the one I should look into.

And for snewsMU.php, just leave it alone, or you will mess up the whole site.
Logged