TinyPortal

General => Chit chat => Topic started by: ed_m2 on March 04, 2008, 11:57:35 AM

Title: tp for cms ... a discussion!
Post by: ed_m2 on March 04, 2008, 11:57:35 AM
hi peeps.. just registered up here.

i've recently installed SMF on our tri club website, and liked what i've seen of it so far. (the base site is running wordpress)
browsing round the SMf site i've seen mention of TP and hopped over here to investigate.

i have another magazine style site which is currently running an outdated version of mambo and have been planning a major revamp and upgrade to joomla.

the main requirements for the site are:
- article listing & management
- latest news listing (maybe a seperate category, may want to pull in some feeds here too)
- forum (duh, smf!)
- user system, article notification subscription, lined threads, article submission
(- event calendar a little later)

i'm not a php expert by any means but happy hacking software about.

those with experience of it, do you think tp is a good direction to go?

a little confused with the forum on joomla/tp/smf integration, what features would joomla offer that tp cannot?

thanks for your ideas/expertise!

ed
Title: Re: tp for cms ... a discussion!
Post by: Dragooon on March 04, 2008, 12:01:21 PM
Joomla is no where to go due to the bridge discontinuation.
About your queries
1 - There you go, its there in TP
2 - You can use a News board to
3 - :P
4 - User system? Members? Its there, Article notification subscription ? I do not get this one, lined threads? Neither this one, Article Submission will be there in TP 1
5 - There is a built in calender in SMF.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on March 04, 2008, 03:06:33 PM
thanks.

1-3 good.
4 - bit of a mish mash.
i see articles & categories  as parallels of threads & board areas.
article notification - i mean users subscribing to be informed of new articles or articles in specific categories, in the same way as they might subscribe to a board area for new threads.

lined threads... sorry should be linked, like a discussion topic on smf in respnse to a specific article.

article submission, specific user level able to submit article.

5 - ah true, i havent played with this yet.

if everything is nicely modular and open source then i'm not too afraid to try and tweak it :-)
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on March 19, 2008, 10:41:29 PM
ok... have installed smf 1.1.4 & TP 0.983

still liking what i'm seeing  :up:

off to read up about customising the boxes & theme.
Title: Re: tp for cms ... a discussion!
Post by: G6Cad on March 20, 2008, 06:44:55 AM
Welcome to the club :)  :up:
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on March 20, 2008, 08:25:42 AM
...really... seriously impressed.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 03, 2008, 08:50:53 AM

just to say... i've taken a look at the database structure for TP vs mambo and it looks like it should be pretty straightforward to write a wee script to copy the bulk of my articles across. the only slightly tricky bit being the way mambo includes images.

i'll try and write the script, hack it till it works sufficiently for me to use... and then share it here in case anyone else is doing similar.

:coolsmiley:
Title: Re: tp for cms ... a discussion!
Post by: Ken. on April 03, 2008, 11:34:07 AM
Sharing of code and scripts is one of the things that we enjoy doing here on TinyPortal and one of the things that make this site so great.
If you can get your script to work and post it that will be a good thing! And if you need any help with the coding as you go through the process you may be able to find that help here on TP.  :up:
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 03, 2008, 11:55:37 AM
cheers.

not sure where this discussion should live really.

my pseudo code scribblings look like this so far:


// initialise stuff
set up db variables for mambo
set up db variables for smf/tp
set up array to map mambo section ID to tp category ID

switch (on posted action)

case select_articles
   connect to mambo db
   select * (or first 10 or whatever)
   
   echo
        selected articles (title/intro/content)
        check box against each
        (auto fill depending on mambo published flag, probably dont want to copy unpublished articles)
        mambo section ID & name and corresponding tp category (according to defined mapping)

    submit & post either selected article data.. or maybe just mambo IDs
    close db connection
   
case copy_articles
   connect to smf/tp db
   ID = (find highest article ID)
   loop through selected mambo articles
   check no matching title already ?
      ID = ID +1
      smf.smf_tp_articles.date = mambo.mos_content.created
      smf.smf_tp_articles.body = mambo.mos_content.fulltext
      smf.smf_tp_articles.intro = mambo.mos_content.introtext
      smf.smf_tp_articles.subject = mambo.mos_content.title
      smf.smf_tp_articles.author = mambo.mos_content.created_by_alias
      smf.smf_tp_articles.category = mapped mambo category
   close db connection



maybe loop through in sets of 10 articles for ease.

i'm using the form type submit/post method with a case statement for each action... cos thats all i know in my limited php experience.. is there a better way to pause the script and wait for user input ?

i'll try and make that work first.... then add some kind of parsing the info from the mambo images field into the body text.

this is where i work out doing the script takes as long as manually copying all my articles (and i have plenty).. but more "fun" tho  ::)

(incidentally the website i'm converting is www.ultrarunner.co.uk)
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 10, 2008, 09:39:40 PM
phew this is hard work.

definitely approaching the script taking as much effort as manual transfer.

learning and awful lot along the way though which is good.

i now have
- a form & array for cross referencing mambo sections with tp categories.
- a form & table to select which articles to copy & which category they'll be going in according to the above array.

almost ready to start test copying a few articles and working on the image handling.

e.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 16, 2008, 09:38:24 AM
starting to copy selected articles across today.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 17, 2008, 12:55:43 PM
ok.. afer toying with the text->tables script i figured i best get on with my own.

HELP...

i have it copying an article into TP.
it strips nasty characters out of the title, intro & text and squirts them into the TP articles table ok.

i've manually moved it into the right category for now, it is set as active by default.
but doesnt show in the category listing, or  display from a direct url.
http://www.ultrarunner.co.uk/forum/index.php?cat=22
http://www.ultrarunner.co.uk/forum/index.php?page=16

error given is:
QuoteThe article isn't active, hasn't been approved yet, or simply does not exist.

it IS active..... but i'm not familiar with what field 'approves' an article.
anything else i'm missing ?

cheers, ed.
Title: Re: tp for cms ... a discussion!
Post by: JPDeni on April 17, 2008, 02:44:08 PM
There's the "approved" field, which has to be set to 1 and the "off" list, which has to be set to 0.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 17, 2008, 02:55:54 PM
these flags dont seem to exist in the admin interface for articles ?
either on the article view or the options page.

either way in phpmyadmin these are both set correctly.

the copied article seems to have a few empty fields, not sure if this is allowed.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 17, 2008, 03:01:56 PM
aha bingo.... author id = 0 is not valid... even if author contains a value.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 17, 2008, 04:49:23 PM
ah ok... looks like author id has to be a valid user id.
Title: Re: tp for cms ... a discussion!
Post by: JPDeni on April 17, 2008, 04:56:09 PM
That's what I would assume.
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 17, 2008, 05:13:21 PM
hmmmm yes its logical, i guess the check is there to stop broken links to profiles.

but obviously none of my current article's authors exist as users at present, and often i'll be entering the articles and putting somebody else's name as the author.
(which at present means modifying the database).

on the plus side it handles linking a different author's name to my profile ok.
Title: Re: tp for cms ... a discussion!
Post by: G6Cad on April 18, 2008, 07:29:32 PM
Is this a discussion or support thread for some thing else ?  Im pretty lost right now  ???
Title: Re: tp for cms ... a discussion!
Post by: ed_m2 on April 20, 2008, 08:14:08 PM
just talking to myself really.

somewhere earlier on it was mentioned about sharing the code etc. so i'm just keeping anyone that cares updated.

i did question where this should be now but no one answered so i'm carrying on :)