Please login or register.

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

Author Topic: [PACK] Internet Sharing template (sNews 1.5)  (Read 11869 times)

right hosting

  • Newbie
  • *
  • Karma: 0
  • Posts: 26
[PACK] Internet Sharing template (sNews 1.5)
« Reply #15 on: January 31, 2007, 07:24:00 AM »

this looks like a great mod/template...  :P
Logged

Thalyn

  • Guest
[PACK] Internet Sharing template (sNews 1.5)
« Reply #16 on: July 19, 2007, 01:37:31 PM »

Hi guys  :)

It's my first post on forum, and ... Congratulations for this swetty cms, sNews!!  :D
Very light, very small but very strong cms ! :)

Sorry for my english, but i have an excuse (lol) !
I'm French and like the majority of the French People, I am stupid guy and i'm very bad in others languages. loll

I "discovered" this cms yesterday only (Usually, i am "Joomla User") but sNews is very light ... and... Very interesting.

Internet Sharing Template is very nice too for me. Actually, I'm using it with this "package".
But after some "troubles", I have to make some modifications that I propose to you here. I'm newbie on this cms and php too, but i think is ok.
Your welcome, of course, for modifications, suggestions etc... :)

In end of #SITE LANGUAGE VARIABLES, Add:
Code: [Select]
$l['Print'] = 'Print';
$l['Editor'] = 'Edit';
$l['Read'] = 'Read';
This modifications is better (i think) for the Translate file (snews_XX.php).

##For    '.l('Read').'  ##
Change Line (~535):
Code: [Select]
echo '<a href="'.db('website').$category.'/'.$r['seftitle'].'/" title="'.$r['title'].'" class="bluebtn">'Read</a>';With:
Code: [Select]
echo '<a href="'.db('website').$category.'/'.$r['seftitle'].'/" title="'.$r['title'].'" class="bluebtn">'.l('Read').'</a>';##For    '.l('Editor').'   ##
Change this line (~393):
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">Editor</a>' : '';with:
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">'.l('Editor').'</a>' : '';Change this line (~422):
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">Editor</a>' : '';With
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">'.l('Editor').'</a>' : '';Change this line (~535):
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">'.l('Editor').'</a>' : '';With:
Code: [Select]
echo $_SESSION[db('website').'Logged_In'] == 'True' ? '<a href="'.db('website').'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['seftitle'].'" class="redbtn">'.l('Editor').'</a>' : '';Change this line (~558):
Code: [Select]
$edit_link = $link.'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['title'].'" class="redbtn">Editor</a>';With:
Code: [Select]
$edit_link = $link.'index.php?action=admin_article&id='.$r['id'].'" title="'.l('edit').' '.$r['title'].'" class="redbtn">'.l('Editor').'</a>';##For    '.l('Print').'   ##
Change this line (~394):
Code: [Select]
echo '<a href="printers/printtop.php" target="_blank" class="greenbtn">Print</a>';With:
Code: [Select]
echo '<a href="printers/printtop.php" target="_blank" class="greenbtn">'.l('Print').'</a>';Change this line (~425):
Code: [Select]
echo '<a href="printers/printright.php" target="_blank" class="greenbtn">Print</a>';With:
Code: [Select]
echo '<a href="printers/printright.php" target="_blank" class="greenbtn">'.l('Print').'</a>';Change this line (~536):
Code: [Select]
echo '<a href="printers/printmain.php" target="_blank" class="greenbtn">Print</a></p></div>';With:
Code: [Select]
echo '<a href="printers/printmain.php" target="_blank" class="greenbtn">'.l('Print').'</a></p></div>';I modified too, the Calendar Mod. this date is not "French Format"
In example, by default, the date is:
July
15th
I transform it for:
15
Jui

I'm newbie in php, i modified this lines with "google". Maybe it's not better solution :/
Don't hesitate to Propose if you have others solutions :)

Go to, this line:
Code: [Select]
<div class="calendar"><p>
  <?php echo strtoupper(date('M'strtotime($r['date']))); ?>


<?php echo date('jS'strtotime($r['date'])); ?>
</p></div>
<?
// End of mod add-in ----------------------------------------------------------
Change it by (2 choices):
First, for date in "15 Jui" (for 15 Juillet)
Code: [Select]
<div class="calendar"><p>
  <?php 
$date date("Y-m-d H:i:s");
$timestamp strtotime($r['date']); setlocale(LC_TIME"fr_FR");
echo strftime("%d"$timestamp); ?>



<?php echo strtoupper (strftime("%b"$timestamp)); ?>
</p></div>
<?
// End of mod add-in ----------------------------------------------------------
Or for date in "Jui 15" (for 15 Juillet)
Code: [Select]
<div class="calendar"><p>
  <?php 
$date date("Y-m-d H:i:s");
$timestamp strtotime($r['date']); setlocale(LC_TIME"fr_FR");
echo strtoupper (strftime("%b"$timestamp)); ?>



<?php echo strftime("%d"$timestamp); ?>
</p></div>
<?
// End of mod add-in ----------------------------------------------------------
Next, modifcation Translate file:
For snews_FR.php, in the end of this file paste this:
Code: [Select]
$l['Print'] = 'Impr';
$l['Editor'] = 'Editer';
$l['Read'] = 'Lire +';
For others languages, simply change "Impr", "Editer" and "Lire +" by words in your language.
It's "Lire +" because "Lire" (only, without " +") make trouble.
The boutons "Lire" and "Impr" aren't space between.
With " +" it's ok. There is space between this two butons. I don't know why :/

Next, some modifications in Style.css
I don't know if users of this template are same problem, but (for me), the image for the search bar doesn't appear.
I change lines for fix my problem:

Line ~38:
Find and remplace:
Code: [Select]
input.search { width: 279px; border: none; background: #fff url(images/input.gif) no-repeat; padding: 6px 10px; color: #1E67A8; font-weight: bold; }
input.button { padding: 3px; }
by:
Code: [Select]
input.searchfield { width: 178px; border: none; background: #fff url(images/input.gif) no-repeat; padding: 6px 10px; color: #1E67A8; font-weight: bold; }
input.searchbutton { padding: 3px; }
I modified the image too because I think that Search bar is too long (for me, it's my opinion).
Take this image and give it name : input.gif (after rename the orginale by: input_origin.gif for example).


This is resultat:



Like you see, i have little problem again. The date in calendar is not center. I don't know why.
I'll try to fix it in the Css File.
In calendar i have trouble too, with December month. In French, it's "Décembre". I have not problem for accent   in sNews only for calendar :(
It write D�C for DÉC. I think is problem of Iso, However my server is set in UTF8.
If you have solution, i take it! loll


And... I have request! :D
I tryed to use this template with 1.6 version de sNews. But it doesn't work at home :(

Did you think propose this template (with mods) for 1.6 version soon ?


I think that's all... Not more modfications
I don't know if my modifcations is very intersting... i hope  :)
I hope too, to have not mistackes  :rolleyes:

My apologize again, for my english :(

See you soon :)
« Last Edit: October 05, 2007, 02:56:44 PM by Keyrocks »
Logged

brianvtm

  • Newbie
  • *
  • Karma: 0
  • Posts: 10
[PACK] Internet Sharing template (sNews 1.5)
« Reply #17 on: July 20, 2007, 04:21:15 PM »

I just had one of my clients test it.  Great job Keyrocks!

Will you port it to 1.6?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[PACK] Internet Sharing template (sNews 1.5)
« Reply #18 on: July 20, 2007, 08:08:39 PM »

Quote from: brianvtm
I just had one of my clients test it.  Great job Keyrocks!
Will you port it to 1.6?
No... not me. This will not work with the default snews.php file in sNews 1.6 because there are several hard-coded changes within the 1.5 snews.php file that came with your download (if you used my package) in order to make the template work. Since these changes were all template-specific, that snews.php file is only good for that particular template as well.

You can find all the change locations in that snews.php file by searching file-wide for Template and you will be able to figure out what changes were made and where. Then, with the default 1.6 snews.php file also open in your code editor, search for all the same locations using another search term(s) and then try inserting the changes in the 1.5 file into the 1.6 file. Just remember to make a back-up of your 1.6 file before starting so you have a fresh one if your work-file becomes screwed up. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: 1 [2]