Advertisement:

Author Topic: SMF Articles  (Read 307577 times)

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,203
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #280 on: May 14, 2009, 07:03:03 PM »
what version of SMF are you using?   The mod supports that standard SMF permissions...   if a user belongs to ANY group with "allow" and NO group with "deny" then they should be able to access the articles.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #281 on: May 15, 2009, 02:40:15 AM »
2.0RC1
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #282 on: May 15, 2009, 03:46:47 AM »
If i post up my subs.php when i get home can you please take a look at it.

Many Thanks

Matt

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #283 on: May 15, 2009, 05:15:03 PM »
Sure
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #284 on: May 16, 2009, 10:00:24 AM »
Sorry about the delay here is the subs.php

Thanks

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #285 on: May 16, 2009, 03:27:21 PM »
mattchewone,

Subs.php attached is correct for standard SMF Articles install. Try upoloading it and checking that you have a simgle Articles tab on your menu that takes you to http:///(forumurl).../index.php?action=articles.

Let me know if that works then we'll get the category id's of photography and photoshop and set up the tabs as you want them

If that subs.php doesn't work, I would uninstall and reinstall SMF Articles as another php file is the cause and it will take too long to find. On uninstall you may get an error on a file - if so, stop the uninstall process, make a note of the error and post that file here.

W
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #286 on: May 16, 2009, 04:19:48 PM »
Thanks Willerby,

Here is there error when uninstalling -

4.   Execute Modification   ./index.php   Test failed
   1.   Replace   ./index.php   Test failed

I have attached the index.php also.

Matt

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #287 on: May 16, 2009, 04:46:18 PM »
Ok Matt, there's your error. The index.php file changes for Articles aren't there. I've added them manually in this version attached.

Upload this file. Check to see if articles working. If so, let me know the category id's of the articles sections you want on your tabs and what you want them called and I'll amend subs.php for you.

If articles still not working correctly, uninstall the articles mod (again if an error let me know and post the file but should uninstall ok now). Then reinstall articles completely.

We're nearly there now...

 
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #288 on: May 16, 2009, 05:04:13 PM »
Fantastic, just uploaded it and it works fine again, what was it that changed?

Here is the URL for the photoshop -  index.php?action=articles;cat=1
Here is the URL for the Photography - index.php?action=articles;cat=2

Thanks so much Willerby

Matt


Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #289 on: May 16, 2009, 05:21:40 PM »
Good.

If you go to the mod page and click on the PARSE button it shows you the changes to each file. The index.php file has an articles array action edit - a simple addition of the line

Code: [Select]
'articles' => array('Articles2.php', 'ArticlesMain'),
That wasn't in your index.php file hence why articles wouldn't work. It's also why the mod wouldn't uninstall - it couldn't find that line to delete it. The error on uninstall therefore tells you where the error is likely to be.

Here's the amended subs.php which will create two tabs - "Photoshop Articles" which points to category 1 and "Photography Articles" which points to category 2.

Upload this to the Sources directory (remember to keep a ~ tild copy of the now working version first) and check it works. If you want to change the tab labels edit the file in Notepad searching for those two tab labels and replacing them with whatever text you want.

{This edit does not use language files but hard codes the "labels" into the file. If your forum uses multiple languages come back to me as we will need to edit modifications.english.php and any other language files and change the subs.php code to refer to the relevant text references.}
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #290 on: May 16, 2009, 05:33:22 PM »
Thank you Willerby! I will get on and do this now!

Are you able to tell me how i ca add the ~ tilde to the original subs.php please i am still new to this.

Also i dont suppose you know if there is way to edit the articles display template so that it displays the articles under the category title for example, when you click the photoshop articles tab, it displays all the articles rather than a category link.

Thank you again!

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #291 on: May 16, 2009, 06:18:41 PM »
If you are using ftp to upload files, go to the Sources directory and rename the original subs.php files as subs.php~  (tild symbol is above # key on my keyboard).

Then upload new subs.php.  If an error occurs when you check your site,  delete the new subs.php you uploaded and rename the original file back to subs.php by taking off the tild.


Re the articles display, thats what the code does I think... It will result in a list of all articles in that category. Let me know if that's not what you wanted...
What type of washing machine is September?

An autumnatic. :)

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #292 on: May 17, 2009, 07:33:53 AM »
Thank you Willerby,

I have just put in the newly edited Subs.php and it works wonderfully! Its fantastic, now i will build them up with wonderful articles before i allow people to view them.

Thank you once again.

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #293 on: May 19, 2009, 05:22:25 PM »
vbgamer,

Does this mod support secondary membergroups eg. where a member belongs to more than one member group?

I have just set up an articles section for which only one member group can see. If that's their primary member group they can view but if its not (ie. its an additional group that they belong to) they cannot view...

I've checked member group permission and article permissions and all is correct.

Bug?

Still don't know if this is a bug. I think it is as all permissions ok. If I change the order of two member groups that a member belongs to (so that the one that was primary becomes secondary and vice versa) they can see articles one way but not the other. As that is just an order change not a change in  permissions I'd say this mod does not support secondary member groups...

If you agree, how do I fix?
What type of washing machine is September?

An autumnatic. :)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,469
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #294 on: May 20, 2009, 09:48:06 PM »
It is a bug with secondary membergroups.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Angelotus

  • Sr. Member
  • ****
  • Posts: 881
  • Gender: Male
    • Weeklyfun.nl | The Dutch Society of Fun
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #295 on: May 28, 2009, 05:41:51 AM »
Something else. In the view article template, how can I get the article ID?
I need it for social bookmark.

I tried this, but no luck:
Code: [Select]
<a href="http://nujij.nl/jij.lynkx?t=', $context['article']['title'], '&u=' , $scripturl , '?action=articles;sa=view;article=' , $context['article_id'] , '" target="_blank"><img src="http://nujij.nl/nu-jij-icon-16x16.gif" border="0" /></a>

Can I get some help with this please?

Offline SimonSays

  • Newbie
  • *
  • Posts: 7
    • Whedonage
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #296 on: June 01, 2009, 09:07:52 PM »
I've been looking at using SMF Articles as a replacement for TinyPortal's news system, which still isn't close to readiness for SMF 2.0.

I've got a fresh install of SMF 2.0 RC1-1; along with the latest SMF Articles mod. The database is a copy of one which I'd used for TP .98 ('cause 1.0beta is flaky) -- which has been upgraded to SMF2.0RC1-1.  I've confirmed that TP articles are in the database

Whenever I try to use the SMF Article "Import TinyPortal" option, I get the following error:
Quote
Database Error
Table 'xxx_smf3.Arraytp_articles' doesn't exist
File: /home1/xxx/public_html/xxx/Sources/Articles2.php
Line: 2630
Line 2630 is
Code: [Select]
SELECT authorID ID_MEMBER, subject title, intro description, views, approved, date FROM {$tp_prefix}articles ");Looking at the code, the trouble may be at line 2582 which defines the tp_prefix variable as:
Code: [Select]
$tp_prefix = $smcFunc.'tp_';Unfortunately, I'm a php-neophyte, so I'm not sure what it should be doing. In reading this message about changes to database functions in SMF2, it appears that the code needs to be updated?
« Last Edit: June 01, 2009, 10:11:08 PM by SimonSays »

Offline SimonSays

  • Newbie
  • *
  • Posts: 7
    • Whedonage
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #297 on: June 01, 2009, 11:06:34 PM »
Quick follow-up. After playing with the code a bit, I figured out that the variable $tp_prefix was unneeded so  I commented out line 2582 (to keep the line numbering the same), and simply changed line 2630 to
Code: [Select]
SELECT authorID ID_MEMBER, subject title, intro description, views, approved, date FROM {db_prefix}tp_articles ");and line 2635 to
Code: [Select]
FROM {db_prefix}articles AS a, {db_prefix}tp_articles AS t
Now all the TP articles are able to be imported into a single SMF Article category -- which isn't ideal, but I can eventually reassign them by hand. However another problem shows up: TP articles are in HTML; and do not seem to want to display as such in SMF Articles. Am I missing something-- such as a setting somewhere to turn on HTML in the articles?

Finally, it would be ideal for a proper import that the comments also be imported... they are stored in the table "tp_variables" (as are the actual TP categories) -- anyone able to take a stab at a way to copy these to the correct articles? (it should be similar to importing the TP articles themselves, right?)

Thanks ever so much!

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,203
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #298 on: June 02, 2009, 08:28:36 AM »
Articles does not allow HTML, for security...   just like forum posts, the articles need to have the HTML removed and/or converted to BBC.

(Yes, I have the same issue with 900 articles imported from a former joomla installation, but some of the work I did by exporting the articles table in a text file and then performing global replaces before dropping the table and importing the revised table.)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline SimonSays

  • Newbie
  • *
  • Posts: 7
    • Whedonage
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #299 on: June 03, 2009, 02:02:11 AM »
Articles does not allow HTML, for security...   just like forum posts, the articles need to have the HTML removed and/or converted to BBC.
I'm not clear what the security concern would be in removing HTML from the imported articles -- forum posts can be set to allow limited HTML. Does that mean that TP's implementation (Using FCKeditor) in its own article system is insecure?

It also makes this import quite a bit less useful, if the text has to then be re- (or pre)-edited. While I don't have 900, I do have about 300 articles; and I'm not looking forward to re-writing the articles in BB codes.

Unless Articles has a means to allow even a limited subset of HTML (as in forum posts), I'd be include towards looking at other options, such as using a WordPress front-end.