Please login or register.

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

Author Topic: [megaMOD] for snews1.4-txtdb  (Read 13519 times)

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« on: July 07, 2006, 04:52:06 pm »

Today I exagerately modded...
I can't do a single explained MOD so *url removed*

(txtdb! easy to convert in mysql)

/*NEW*/

fix: new articles for editor
fix: captacha error on sending comment resulting in "Your comment was not sent" error

old changes:
- 2 user: editor and admin
- High priority to keep fix an article at the top
- Multiple attachment transfer MOD (by keyrocks)
- fixed download of attachments
- Default settings are in snews-txtdb.php again.
- new way to include sNews in index.php to allow Per-site settings

Code: [Select]
$thispage="index.php";
$snews_overriding_configfile="snews-config.php";
include ("../snews/snews-txtdb.php");
?>
-support for TinYMCE
-support for FCKeditor

(FTF: from this forum)
(FTF&M: from this forum and modded)
- choose if use contact or not
- my server can't read .htaccess -> all code rewritten to do without it
- internal use of s('thispage'))
- added an alternative layout for read_more...
- added a management of attachments on articles
- Added FCKeditor
- added breadcrumbs (FTF&M)
- javascript_head only if logged in (FTF)
- articles are displayed only per category on every page
- ip logging (FTF)
- code validation using alternatively GD (FTF) or textually with Text(THaCAA)
- custom_block position (position=153) (FTF&M)
- different positionning in menu for fixed items and  category related ones (position=154)
- custom_block(categoryname) display only articles of categoryname
- archives show articles by category,year,month (FTF&M)
- all class="someclass"  moved to // CSS SETTINGS
- description and keyword for metatag (FTF)
- inclusion mod (FTF)
- print friendly (FTF)
- RSS use description for metatag instead of article text (only for published ones)
- admin_comment (FTF)
- selective_center(n,m) -> n articles on homepage m on others (FTF)
- fix: update_articles for txtdb (FTF)
- archives even shows unpublished article if logged in for every position
- fix: email header (FTF)
- by deleting an article its comments are deleted too
- added last_update()  -> "last updated: YYYY-MM-DD" based on last updated article
- added getattachment(id) -> download attachment and count an Hit !
- added showattachments() -> lists all attachments in a configurable table by: $s['showattachments_columns']= "#name#description#version#"; // available colums:"#name#description#version#license#platform#"
- showattachments() -> when logged in even shows the hit counter for each file


feel free to analyse my code and.... destroy it ... ;)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
[megaMOD] for snews1.4-txtdb
« Reply #1 on: July 07, 2006, 06:44:31 pm »

You have been a busy little bird fray-zack - an excellent contribution!

Would it be possible to provide a narrative description that introduces what you had set out to do when you started this project, and a clearer idea of what it is that you added, changed and/or deleted from the snews.php file (non-mysql version), to arrive at what new level of functionality. Also, since it is easy to convert for the MySQL version, would you be willing to create a working snews.php file will all of your mods incorporated? This would allow us to test-run it easier. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

chiskop

  • Full Member
  • ***
  • Karma: 3
  • Posts: 152
    • http://www.chiskop.net
[megaMOD] for snews1.4-txtdb
« Reply #2 on: July 07, 2006, 07:52:47 pm »

Sheesh ... I'm not sure I even unnerstand the code you used to annotate your mods!

It's all good. And thanks for all the work you've obviously put into this.
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[megaMOD] for snews1.4-txtdb
« Reply #3 on: July 08, 2006, 07:52:51 am »

my compliments, fray_zack. i will destroy it :D when time permits me
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

albert

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 405
    • http://www.oswt.co.uk/
[megaMOD] for snews1.4-txtdb
« Reply #4 on: July 08, 2006, 01:27:54 pm »

Hi

been trying the code out.

it would be better to zip up the code or make into a txt file for all to test.
plus a working demo.

so fare I get this

Php-Txt-Db-Access Error:
Column Type ) not supported

Php-Txt-Db-Access Error:
Query 'CREATE TABLE articles(id inc, title str, seftitle str, text str, textlimit int default '0', date int, category int default '0', position str, displaytitle str default 'YES', displayinfo str default 'YES', commentable str, image str,attachment str, published int default '1',description_meta str,keywords_meta)' failed

Php-Txt-Db-Access Error:
readTable(): Cannot open Table articles

Php-Txt-Db-Access Error:
Reading Table articles failed

Php-Txt-Db-Access Error:
Query 'SELECT * FROM articles WHERE published = 0' failed

Php-Txt-Db-Access Error:
Column Type ) not supported

Php-Txt-Db-Access Error:
Query 'CREATE TABLE articles(id inc, title str, seftitle str, text str, textlimit int default '0', date int, category int default '0', position str, displaytitle str default 'YES', displayinfo str default 'YES', commentable str, image str,attachment str, published int default '1',description_meta str,keywords_meta)' failed

Php-Txt-Db-Access Error:
Column Type ) not supported

Php-Txt-Db-Access Error:
Query 'CREATE TABLE articles(id inc, title str, seftitle str, text str, textlimit int default '0', date int, category int default '0', position str, displaytitle str default 'YES', displayinfo str default 'YES', commentable str, image str,attachment str, published int default '1',description_meta str,keywords_meta)' failed

Php-Txt-Db-Access Error:
readTable(): Cannot open Table articles

Php-Txt-Db-Access Error:
Reading Table articles failed

Php-Txt-Db-Access Error:
Query 'SELECT * FROM articles WHERE position = 1 AND published <> 0 AND category = 0' failed

after setting it all up

can you help on this :)


Albert
Logged
Albert
http://snews.awddesign.co.uk/snews/ site: v1.3
http://snews.awddesign.co.uk/           site: v1.2 http://www.awddesign.co.uk/
“Putting together the largest collection of sNews 1.5 designs. Coming very soon :)

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« Reply #5 on: July 10, 2006, 09:50:32 am »

Hi! I uploaded a working(fixed) copy *url removed*
Logged

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« Reply #6 on: July 10, 2006, 10:44:55 am »

/*all the needed files are included in the testSite zip linked in the first post*/

Now I try to explain what the major changes I made (not already explained in this forum) are doing....

(and I'm sorry for my english...)

- Added FCKeditor
   When you add or edit articles you can format it using  this simple editor

- code validation using alternatively GD (FromTthisForum) or textually with Text(THaCAA)
    When people submit a form it has to be validated by a code using a random generated image (if GD library installed) or using a random quiz (Text(THaCAA))

- choose if use contact or not
new option in SETTINGS:
Code: [Select]
  $s['use_contact'] = "NO" //or YES- added an alternative layout for read_more...
   by clicking on a read_more link it opens a different page (if enabled).
new options in SETTINGS:
Code: [Select]
/*MOD:if you want to change layout to read all the article*/
$s['read_more_in_other_page']='YES'; //or not
$s['read_more_page']='alternative.php';
- added a management of attachments on articles
  in menu_items -> attachments
  you can manage attachements like images: an attachment can be linked to an article.
new option in SETTINGS:
Code: [Select]
$s['attachment_folder'] = "attach"; // Folder to save attachments- articles are displayed only per category on every page
when you choose a category center(), left() and right() now
only show articles of that category to fix one or more articles on a page you have to use:

-new function:  custom_block('yourcategorysef') or custom_block('yourcategoryname')
it fixes a specified articles on a page.
for example:
create an article and put it in category 'notes', position 15 ('Custom Block') and then show it like so:
Code: [Select]


- RSS use description for metatag (if found) instead of article text (only for published ones)

- archives even shows unpublished article if logged in for every position

- by deleting an article its comments are deleted too

- new function: last_update()  ->
Code: [Select]
shows:
Code: [Select]
last updated: 2006-07-08based on last updated article

new INTERNAL function getattachment(id)
   download attachment and count a Hit !

new function: showattachments()
used  in menu_items -> lists all attachments in a configurable table.
Options in SETTINGS:
Code: [Select]
$s['showattachments_columns']= "#name#description#version#"; // available colums:"#name#description#version#license#platform#"when you are logged in, it even shows the hit counter for each file


...........

I didn't add useful comment in my code because of time.... You can look for 'MOD:' string but don't expect to find all differences....

...........

:)
Logged

Sjoerd

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
[megaMOD] for snews1.4-txtdb
« Reply #7 on: July 11, 2006, 01:02:54 pm »

Hmm It look like a great mod but why don't you make a download package that's easy to install? And it would be great to get some help of using it.
Logged

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« Reply #8 on: July 11, 2006, 02:54:23 pm »

OK! I'just finished a test site and you can download all my mods *url removed*

please verify your configuration in testSite/snews-config.php

Hi!
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
[megaMOD] for snews1.4-txtdb
« Reply #9 on: July 11, 2006, 02:57:14 pm »

There isn't an uploaded version of this ? Do you have an URL to show off an existing copy that works ??

Patric.
Logged
"It's only dead fish that goes with the flow... "
Updated

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« Reply #10 on: July 11, 2006, 03:31:15 pm »

Not yet....
I'm converting my website but it takes time...
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
[megaMOD] for snews1.4-txtdb
« Reply #11 on: July 11, 2006, 03:45:17 pm »

Goodie, post a link when you're done, eh ? Nice work, fray...really nice ;)
Logged
"It's only dead fish that goes with the flow... "
Updated

albert

  • Sr. Member
  • ****
  • Karma: 0
  • Posts: 405
    • http://www.oswt.co.uk/
[megaMOD] for snews1.4-txtdb
« Reply #12 on: July 12, 2006, 05:39:09 am »

Hi

Got the baby working Now :)

had to make lttle ajustments, removed fck editor fr fast install.

adding text ok but when changing the text after a few times you notice things not showing up. like meta even though you put it in. Go back then to advanced and it comes back.

function menu_items()

moved up as the side links was not showing, works now, but still not happy.

try a search, as I feel this is not working.

but great addition to sNews thanks fray_zack, will play some more...

Albert
Logged
Albert
http://snews.awddesign.co.uk/snews/ site: v1.3
http://snews.awddesign.co.uk/           site: v1.2 http://www.awddesign.co.uk/
“Putting together the largest collection of sNews 1.5 designs. Coming very soon :)

mejobloggs

  • Full Member
  • ***
  • Karma: 0
  • Posts: 125
[megaMOD] for snews1.4-txtdb
« Reply #13 on: July 12, 2006, 05:55:33 am »

What's the opinion on TinyMCE vs FCKeditor?
Logged

fray_zack

  • Newbie
  • *
  • Karma: 0
  • Posts: 23
    • http://fray.host.sk
[megaMOD] for snews1.4-txtdb
« Reply #14 on: July 12, 2006, 10:49:25 am »

Hi!

@albert
fixed problem with meta & search function now is working..

Quote from: albert
function menu_items()
moved up as the side links was not showing, works now, but still not happy.
??????

try to download the complete testSite in the zip (the url is in the first post of this thread)
Logged
Pages: [1] 2 3