Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: [MOD] Additional Article Position Options (sNews 1.5)  (Read 25698 times)

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 166
    • domdelimar.com
[MOD] Additional Article Position Options (sNews 1.5)
« on: September 22, 2006, 10:25:26 PM »

Revision: 5 January 2007 (just a little cosmetic patch, nothing serious)
Revision: 31 December 2006 (fixed bug in search function; instructions updated)
Revision: 8 December 2006 (compatible with sNews 1.5.30 Stable)
Revision: 26 October 2006 (made it compatible with sNews 1.5 RC2, fixed some mistakes in instructions - overview in the post below)

Mod version: 1.0.2
For sNews version 1.5
Example: please see the post following this one.

It all started with keyrocks' post about creating a new article position in sNews 1.4 which you could then use for really anything - as keyrocks points out: "to list several product containers in one specific Category's page(s)... say Products... as sort of a lite e-commerce option"
Or any other extra content for a specific category or page, like for example a category description above the articles list or an announcement in the same place...

Encouraged with a success in 1.4 I thought it couldn't be that hard to pull this off in 1.5.
And it took me awhile before I figured out how some things work now in 1.5 and I think it was worth the trouble as I did figure out (I think ;)) how some things work, eventually, and I even learned many new PHP functions :D
Also, I think I have finally learned to put ";" at the end of each PHP line... ;)

I went down this route:
I had an intention to use the extra() function as a template for any subsequent article position I'd like to make.

So shall we start with the extra() function then?

Note first that these are really short step-by-step instructions of everything you need to change in your snews.php to get a new article position.
You can even download the snews.php file taken from the fresh install of the sNews 1.5 Stable, developers version 1.5.30, already modified with this mod from domdelimar.com if you don't want to follow these instructions.

Unless otherwise noted, all the work is done in your snews.php file. I don't guarantee anything so make sure to BACKUP your existing snews.php file just in case...

OK...

Find the extra function [search for: function extra()], and right below that function paste this code:

Quote
function second_extra() {
   $categorySEF = get_id('category');
   $categoryId = (check_category($categorySEF) == true || empty($categorySEF) || $categorySEF == s('home_sef')) ? 0 : retrieve('id', 'categories', 'seftitle', $categorySEF);
   $pageSEF = get_id('article');
   $pageId = (empty($categorySEF)) ? 0 : retrieve('id', 'articles', 'seftitle', $pageSEF);

   $query = "SELECT * FROM ".db('prefix')."articles WHERE SUBSTRING(position, 1, 1) = '9' AND published = 1 ORDER BY id DESC";
   $result = mysql_query($query);
   while ($r = mysql_fetch_array($result)) {
      $pos = $r['position']; $pos_depend = substr($pos, 1, 1); $pos_artID = substr($pos, 2);
      switch (true) {
         case ($pos_depend == 0 && $categoryId == 0): $print = true; break;
         case ($pos_depend == 1 && $categoryId == $pos_artID): $print = true; break;
         case ($pos_depend == 2 && $pageId == $pos_artID): $print = true; $category = -1; break;
         case ($pos_depend != 2 && $r['category'] == -1): $print = true; break;
         default: $print = false;
      }
      if ($print == true) {
         echo $r['displaytitle'] == 'YES' ? '<h3>'.$r['title'].'</h3>' : '';
         file_include($r['text'], 99990000);
         echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<p><a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'">'.l('edit').'</a></p>' : '';
}}}
This is actually a copy of the function extra() with minor changes shown in blue color.

Short explanation: our new position will be denoted with a position string which starts with number nine (9). In default sNews 1.5 there are three positions: position value of 1 denotes this is an article, position value of 3 denotes a page and position value which starts with number 2 denotes this is extra content. Luka, mika - did I get that right?

Now, let's add some admin language variables that we'll need later:
Search for: #ADMINISTRATION LANGUAGE VARIABLES
At the end of admin. language variables, before
Quote
} return $l[$variable];
add three more variables:
Quote
$l['second_extra_contents'] = 'Second Extra contents';
$l['second_extra_new'] = 'New Second Extra Contents';
$l['second_side'] = 'Second Extra contents';
Now we need to change the function center().
Search for function center().
In center function find this line:
Quote
case 'extra_contents': if (isset($_SESSION[db('website').'Logged_In'])) {admin_articles('extra_view');} break;
Right below this line add the following:
Quote
case 'second_extra_contents': if (isset($_SESSION[db('website').'Logged_In'])) {admin_articles('second_extra_view');} break;
Just a few lines below, you'll see this line:
Quote
case 'extra_new': if (isset($_SESSION[db('website').'Logged_In'])) {form_articles('extra_new');} break;
Below this line add the following:
Quote
case 'second_extra_new': if (isset($_SESSION[db('website').'Logged_In'])) {form_articles('second_extra_new');} break;
Then, several lines below, you'll find the line that says:
Quote
$query_articles = "SELECT * FROM ".db('prefix')."articles WHERE published = 1 AND SUBSTRING(position, 1, 1) != '2'";
You need to change that whole line with the following one:
Quote
$query_articles = "SELECT * FROM ".db('prefix')."articles WHERE published = 1 AND SUBSTRING(position, 1, 1) != '2' AND SUBSTRING(position, 1, 1) != '9'";
That's all we need to do with the center function.

Next thing you do, locate function search(). Several lines down, inside this function, you'll find this line:

Quote
$query = "SELECT * FROM ".db('prefix')."articles WHERE SUBSTRING(position, 1, 1) != '2' AND published = 1 AND";
And replace it with this one:
Quote
$query = "SELECT * FROM ".db('prefix')."articles WHERE SUBSTRING(position, 1, 1) != '2' AND SUBSTRING(position, 1, 1) != '9' AND published = 1 AND";
Now search for: function stats($field, $position)
This function starts with:
Quote
if (!empty($position)) {$pos = $position == 2 ? " WHERE
Well, it needs to start like this (I really wasn't sure about this but it worked at the end so I might have not done a bad job modifying this function):
Quote
if (!empty($position)) {$pos = $position == (2 || 9) ? " WHERE
Can you see the difference? - change it accordingly.

Now search for function administration()
In this function find this line:
Quote
if (stats('articles',2) > 0) {echo $link.'extra_contents/" title="'.l('view').'">'.l('view').'</a>';}
Now, after this line, add this code:
Quote
echo '</p>';
   echo '<p>'.l('second_extra_contents').': <a href="second_extra_new/" title="'.l('add_new').'">'.l('add_new').'</a>';
      if (stats('articles',9) > 0) {echo $link.'second_extra_contents/" title="'.l('view').'">'.l('view').'</a>';}
Next thing you do is search for the function form_articles($contents). In this function we'll do the most of our modding...

First find the part of the code that starts with switch ($edit_option). It looks like this:
Quote
switch ($edit_option) {
         case 1: $frm_fieldset = l('edit').' '.l('article'); $frm_position1 = 'selected="selected"'; break;
         case 2: $frm_fieldset = l('edit').' '.l('extra_contents'); $frm_position2 = 'selected="selected"'; break;
         case 3: $frm_fieldset = l('edit').' '.l('page'); $frm_position3 = 'selected="selected"'; break;
      }
Just after the case 3 line, enter this line:
Quote
case 9: $frm_fieldset = l('edit').' '.l('second_extra_contents'); $frm_position9 = 'selected="selected"'; break;
There's another switch several lines below, which starts with "switch ($contents)". Similarly to the last switch, we'll add one more case line:
Quote
case 'second_extra_new': $frm_fieldset = l('second_extra_new'); $pos = 9; $frm_position9 = 'selected="selected"'; break;
Just nine lines below this switch statement, there's another line we need to change:
Quote
$frm_display_info = ($contents == 'extra_new') ? '' : 'ok';
We need to change it completely with this:
Quote
$frm_display_info = ($contents == 'extra_new' || $contents == 'second_extra_new') ? '' : 'ok';
Two lines below, a very similar thing. This is the line:
Quote
$frm_commentable = ($contents == 'extra_new' || $contents == 'page_new') ? '' : 'ok';
And it needs to be changed with this one:
Quote
$frm_commentable = ($contents == 'extra_new' || $contents == 'second_extra_new' || $contents == 'page_new') ? '' : 'ok';
If you scroll a bit more down, you'll notice this chunk of code:
Quote
if ($contents == 'extra_new' || $edit_option == 2) {
      echo '<div style="display: none;">';
      html_input('text', 'seftitle', 'as', $frm_sef_title, l('sef_title'), '', '', '', '', '', '', '', '', '', '');
      echo '</div>';
   }
You need to change the first line of this chunk of code to this:
Quote
if ($contents == 'extra_new' || $edit_option == 2 || $contents == 'second_extra_new' || $edit_option == 9) {
Next, find this part of the code a little bit further below:
Quote
if ($contents != 'page_new' && $edit_option != 3) {
Two lines below, you'll find this line
Quote
echo ($contents == 'extra_new' || $edit_option == 2) ?  l('appear_category') : l('category');
which needs to be changed into this:
Quote
echo ($contents == 'extra_new' || $edit_option == 2 || $contents == 'second_extra_new' || $edit_option == 9) ?  l('appear_category') : l('category');
Two lines below, almost the same thing. The line which starts with
Quote
if ($contents == 'extra_new' || $edit_option == 2) {echo '<option value="-1"
needs to be changed with:
Quote
if ($contents == 'extra_new' || $edit_option == 2 || $contents == 'second_extra_new' || $edit_option == 9) {echo '<option value="-1"'.($article_category == -1 ? ' selected="selected"' : '').'>'.l('all').'</option>';}
Next line also needs to be changed. It's a line that starts with:
Quote
echo '<option value="0"'.($article_category == 0 && $contents != 'extra_new' ?
and it needs to be completely replaced with:
Quote
echo '<option value="0"'.($article_category == 0 && $contents != 'extra_new' && $contents != 'second_extra_new' ? ' selected="selected"' : '').'>'.l('home').'</option>';
Now, several lines below, there's another if statement. It starts like this:
Quote
if ($contents == 'extra_new' || $edit_option == 2) {
         echo '<p id="def_page"><label for="dp">'.l('appear_page').':</label>
<select name="define_page" id="dp">';
First line of that if statement [if ($contents == 'extra_new' || $edit_option == 2) {] needs to be changed to this:
Quote
if ($contents == 'extra_new' || $edit_option == 2 || $contents == 'second_extra_new' || $edit_option == 9) {
Third line of the same if statement,
Quote
echo '<option value="0"'.($edit_option != 2 ? ' selected="selected"' : '').'>'.l('all').'</option>';
needs to look like this now:
Quote
echo '<option value="0"'.($edit_option != 2 && $edit_option != 9 ? ' selected="selected"' : '').'>'.l('all').'</option>';
Oh my... just a little more... and we're done!

If you scroll down just a little bit more you'll notice a chunk of code which starts with:
Quote
if (!empty($id)) {
Five (5) lines down is this line:
Quote
echo '</select></p>';
Before that line insert this line of code:
Quote
echo '<option value="9"'.$frm_position9.'>'.l('second_side').'</option>';
Then just a few lines below you'll notice one if statement:
Quote
if ($contents != 'extra_new' && $edit_option != '2') {
      html_input('text', ...
You need to change only the first line of it into this:
Quote
if ($contents != 'extra_new' && $edit_option != '2' && $contents != 'second_extra_new' && $edit_option != '9') {
Hmm, after this one, there's another one:
Quote
if ($contents != 'extra_new' && $edit_option != '2') {
      html_input('checkbox', ...
Again, change just the first line of it into this:
Quote
if ($contents != 'extra_new' && $edit_option != '2' && $contents != 'second_extra_new' && $edit_option != '9') {
Finally, we're done with this function. Just 6 more little changes... :)

Search for: function admin_articles($contents)
You see the 'switch ($contents) {' line there followed by 3 'case' lines?
You just need to add the fourth case line:
Quote
case 'second_extra_view': $title = l('second_extra_contents'); $subquery = "WHERE SUBSTRING(position,1,1) = '9'"; break;
Now we need to fiddle with function processing()...
First we find a line of code that says:
Quote
if ($position == 2) {$position = $_POST['cat_dependant'] == 'on' ? 21 : 2;}
And after this line insert this:
Quote
elseif ($position == 9) {$position = $_POST['cat_dependant'] == 'on' ? 91 : 9;}
Now search for case 'admin_article' inside function processing()
This is the code you should see:

Quote
case 'admin_article';
         if (substr($position, 0, 1) == 2) {
            $category = $_POST['define_category'];
            $page = $_POST['define_page'];
            if ($category != -1) {$position = '21'.$category;}
            else if ($page != 0) {$position = '22'.$page; $category = -1;}
         }
Immediately after this code insert the following snippet of the code:

Quote
elseif (substr($position, 0, 1) == 9) {
            $category = $_POST['define_category'];
            $page = $_POST['define_page'];
            if ($category != -1) {$position = '91'.$category;}
            else if ($page != 0) {$position = '92'.$page; $category = -1;}
         }
Just a little bit further below you will find this code:

Quote
switch(true) {
                  case(isset($_POST['add_article'])):
                  mysql_query("INSERT INTO ".db('prefix')."articles(title, seftitle, text, date, category, position, displaytitle, displayinfo, commentable, published, description_meta, keywords_meta) VALUES('$title', '$seftitle', '$text', '$date', '$category', '$position', '$display_title', '$display_info', '$commentable', '$publish_article', '$description_meta', '$keywords_meta')");
                  $pos = substr($position, 0, 1);
                  switch ($pos) {case 1: $link = 'articles/'; break; case 2: $link = 'extra_contents/'; break; case 3: $link = 'pages/'; break;}
You see this last line starting with switch ($pos) ?
It needs to be changed completely with the following:

Quote
switch ($pos) {case 1: $link = 'articles/'; break; case 2: $link = 'extra_contents/'; break; case 3: $link = 'pages/'; break; case 9: $link = 'second_extra_contents/'; break;}
And just 4 lines further down, you'll find a line which starts with

Quote
$link = (substr($position, 0, 1) != '2')
This start should look like this:

Quote
$link = ((substr($position, 0, 1) != '2') && (substr($position, 0, 1) != '9'))
Or the whole line if you wish, should look like this:

Quote
$link = ((substr($position, 0, 1) != '2') && (substr($position, 0, 1) != '9')) ? find_cat_sef($category).'/'.retrieve('seftitle', 'articles', 'id', $id).'/' : (find_cat_sef($category) != s('home_sef') ? find_cat_sef($category).'/' : '');
Finally, just several lines below is the LAST part of snews.php file that we need to change. Whooaa!!

This is the code you will see:

Quote
$pos = substr($position, 0, 1);
                  switch ($pos) {case 1: $link = 'articles/'; break; case 2: $link = 'extra_contents/'; break; case 3: $link = 'pages/'; break;}
Replace the second line (switch...) with this:

Quote
switch ($pos) {case 1: $link = 'articles/'; break; case 2: $link = 'extra_contents/'; break; case 3: $link = 'pages/'; break; case 9: $link = 'second_extra_contents/'; break;}
All that is left to do now is decide where you'd want this new extra content to be shown on your website.
For example, I put mine right above the center function call (in index.php):
Quote
<div id="left">
         <? second_extra(); ?>
         <? center(); ?>
      </div>
Log into your Admin area and there should be something new under Pages:
Second Extra Content or whatever you called it. Try adding a new Second Extra Content now!

Optional: you may want this extra content to be more visible and for example place it in a nice floating box with a different background than your page background.

Here's what you do:
Locate your new extra content function... and change the following part
Quote
if ($print == true) {
         echo $r['displaytitle'] == 'YES' ? '<h3>'.$r['title'].'</h3>' : '';
         file_include($r['text'], 99990000);
         echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<p><a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'">'.l('edit').'</a></p>' : '';
into this:
Quote
if ($print == true) {
         echo "<div class='second_extra'>";
         echo $r['displaytitle'] == 'YES' ? '<h3>'.$r['title'].'</h3>' : '';
         file_include($r['text'], 99990000);
         echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<p><a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'">'.l('edit').'</a></p>' : '';
         echo "</div>";
To accomplish what I wanted to accomplish I'd add this class into my .css file:
Quote
.second_extra {
float:right;
width:40%;
border:1px solid #ccc;
background:#f5f5f5;
padding: 1em;
margin: 0 0 1em 1em;
}
I added some margins and padding definitions so it all integrates nicely between any text the center function shows. Also, width will make sure this box doesn't expand across all of the available screen space.
« Last Edit: September 07, 2007, 06:24:23 PM by Keyrocks »
Logged

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 166
    • domdelimar.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #1 on: September 22, 2006, 10:27:53 PM »

OK, I just followed my instructions prior to posting them here (to kind of bug test them) and added this mod to my main sNews 1.5 site (been working with a testing site until now) and everything went as it should.
I added an introductory text for my sNews category as an extra content which will show above any article links on that category index page.
You can check it out at: http://domdelimar.com/snews/
If you see "Requested contents does not exist" just below this introductory text it means I haven't added any article to this category yet. But that's where the links to articles come anyway.
Logged

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 166
    • domdelimar.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #2 on: September 22, 2006, 10:38:16 PM »

I just realized... in order for this extra content to be treated as a category introductory text (as I wanted it to behave), it should only show up on the category index page, and as it is now it will show up even on articles in this category.

This is because of how the extra() function was built in the first place. It just needs a little modification which I also figured out how to do but forgot to mention it here.

Come to think about it, I'll post it as a separate mod... it makes sense.

EDIT: here it is: http://www.solucija.com/forum/viewtopic.php?pid=13940
Logged

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6290
  • Semantically Challenged
    • snews.ca
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #3 on: September 23, 2006, 04:01:31 PM »

Congratulations Dom - it is great to see the positioning technique being explored further in sNews 1.5.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Andre Griffin

  • Newbie
  • *
  • Karma: 0
  • Posts: 22
    • http://productions.brokenmachines.net
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #4 on: October 26, 2006, 06:24:41 AM »

It seems that some names have been changed in RC2? like extra_view instead of side_view? is this going to matter?
Logged

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6290
  • Semantically Challenged
    • snews.ca
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #5 on: October 26, 2006, 04:09:03 PM »

That was the only change I noticed when I looked thu the snews.php file yesterday. My guess is that Mika changed the name of the function in RC2 to make it more relevant... since the extra can be used anywhere you place the php statement... not just in a "side" position. Mike could confirm this.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 166
    • domdelimar.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #6 on: October 26, 2006, 05:43:36 PM »

I have simply changed all instances of side_new and side_view into extra_new and extra_view.
Also, the processing function has been considerably changed, that is improved it seems to me (less code). We all know some redundant code from v1.4 has been removed but there have been other changes as well so I had to change these instructions accordingly.

And because of that change in processing function one little change has happened in old (v1.5 RC1) extra() function so don't get yourself caught with the copy of the old version of function extra() to use it for second_extra in 1.5 RC2 like I did. :)
Nothing serious will happen if you do, it's just that the little 'Edit' link which shows under your content when you're logged in - simply won't work. Huh! It took me some time to figure this one out... :rolleyes: So check out the function second_extra() in the first post and make sure you made changes to your code correctly (changes are marked with blue color).

I have also discovered I made a little mistake in my instructions:
Where I said you should add in your index.php, that should have been (notice the semicolon) - although, it seems it will work either way.
And, it was sooo embarrassing to discover I failed a simple task of copy and paste so you could have seen like 20 question marks in a row in my original post. Yikes! [sidenote: how come this forum doesn't have an 'embarrassed' smiley?]

I think everything is OK with the instructions now and I've tried to apply them on my testing site and it looks like everything works like it should. You can see the example here: http://domdelimar.com/testing/sNews1.5RC2/

And let me know if it works for you.
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #7 on: December 05, 2006, 07:10:14 PM »

Ok... It's a fact - I'm in love with you aswell, Dom. I will respond gently to your approaches :lol: This works wonders...
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

piXelatedEmpire

  • MIA
  • Thread Moderator
  • ULTIMATE member
  • *****
  • Karma: 37
  • Posts: 1454
  • currently MIA
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #8 on: December 06, 2006, 01:28:39 AM »

Quote from: Patric
Ok... It's a fact - I'm in love with you aswell, Dom. I will respond gently to your approaches :lol: This works wonders...
Did you have to make any changes to Dom's instructions for 1.5 stable Patric?
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4957
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #9 on: December 06, 2006, 07:37:08 AM »

I haven't got the stable version tested with this yet... My declaration of love was regarding this mod in the "almost stable version" 1.5.29... I was planning to try it on the 1.5.30 today... if I only get time ;) But as the 1.5.29 was in fact the stable one with just a few glitches, I suppose it would turn out good... We'll see..

So, I'll have to get back to you on this...
Logged
My sNews site
"It's only dead fish that goes with the flow... "
Updated, online again - Free designs

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6290
  • Semantically Challenged
    • snews.ca
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #10 on: December 06, 2006, 08:05:39 PM »

Does this Mod work with 1.5 Stable Version?
Yes... it does. We should say Thanks Dom! Well done!
I just finished adding it into my current project, porting Luka's Internet Sharing Template to sNews 1.5.30. It appears to be working wonderfully. Adding this mod into 1.5 is a lengthy and tedious process, compared to my similar mod for 1.4. It took me a little longer as I changed the name of the function to extra_right to publish content into a right column container in this particular template.
Again... Dom... Well Done! ")
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Mika

  • sNews Dude
  • ULTIMATE member
  • *****
  • Karma: 9
  • Posts: 1408
    • http://www.ni5ni6.com/
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #11 on: December 06, 2006, 08:14:56 PM »

*I've been reading & testing mods all day... and I definitely need a new keyboard. This one would do just fine. Thanks! :D *

Yes, you guys* rock, but really rock :)

__________
* dom, philmoz, serpantin an others (that's a pretty long list ;)) - sNews is much better just because of you!
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6290
  • Semantically Challenged
    • snews.ca
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #12 on: December 06, 2006, 08:21:40 PM »

Quote from: Mika
*I've been reading & testing mods all day... and I definitely need a new keyboard. This one would do just fine. Thanks! :D *
Now I wouldn't mind finding that under the Christmas tree on Christmas morning! It would sit right nicely on top of my M3 and give me a triple decker! :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Fred K

  • sNews Dude
  • ULTIMATE member
  • *****
  • Karma: 134
  • Posts: 2806
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #13 on: December 06, 2006, 09:57:40 PM »

Quote from: Mika
This one
I want one! I want one! Iwant one! :lol:

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 166
    • domdelimar.com
[MOD] Additional Article Position Options (sNews 1.5)
« Reply #14 on: December 08, 2006, 11:19:24 PM »

Hello everybody!
I've been away for quite some time from this forum... and missed you all!
Patric emailed me the other day and I promised I'll take a look at this mod but everything looks fine.

I'm very glad there's no more work needed to make this mod work with the latest release 'cause just as keyrocks pointed out about adding this mod that it is "a lengthy and tedious process", it ain't no easier bug testing it and getting it to work in the first place.

But the most tedious and lengthy has actually shown to be the process of writing the documentation... arrrgh, I know I promised you guys to outline everything I did to make this mod but I can't get to finish it in a reasonable timeframe so I've decided to just let everybody download the latest sNews version with this mod already integrated. Should have come up with this sooner, d'oh!
You can download it from domdelimar.com - I left comments in places where I changed the code, they won't be much useful to anybody from an informational point of view but at least you can see where the code has been changed if you wish.


P.S. Mika, maybe if you're working all day in front of your computer, you could benefit from using this - I know I would! This one wouldn't hurt either... :D
Logged
Pages: [1] 2 3