Advertisement:

Author Topic: SMF Articles  (Read 307414 times)

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #260 on: May 12, 2009, 11:51:39 AM »
Thank you Kindred.

Is it possible for someone to help with finding the part of themes/default/languages/modifications.english.php
That i would need to edit to change the name of the Tab.

Code: [Select]
$txt['smfarticles_menu'] = 'Articles';
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 #261 on: May 12, 2009, 12:47:36 PM »
Thank you Kindred.

Is it possible for someone to help with finding the part of themes/default/languages/modifications.english.php
That i would need to edit to change the name of the Tab.

Code: [Select]
$txt['smfarticles_menu'] = 'Articles';

I just did this and it didnt work. I tested on 3 different browsers. Any reason why?

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #262 on: May 12, 2009, 02:39:26 PM »
All language files load in cache memory so when you change them you have to clear the cahce so that the new language file is forced to load.

Go to ADMIN>MAINTENANCE>Forum Maintenance>Routine and last option is Empty the File Cache... click Run Task Now

When you go back to your forum home page click refresh on your browser and the tab will change

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 #263 on: May 12, 2009, 02:43:12 PM »
Thank you very much that worked a treat.

Can i ask is it possible to have more than one article tab? Is it going to be possible also to have the article links and brief description under the category?

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #264 on: May 12, 2009, 04:20:46 PM »
Which version of SMF? 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 #265 on: May 12, 2009, 04:24:45 PM »
Yes RC1 2.0

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,197
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #266 on: May 12, 2009, 08:34:57 PM »
you can technically create as many tabs as you want (subs.php) however, you can only install articles once...   why do you want more than one tab?
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 mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #267 on: May 13, 2009, 03:21:40 AM »
you can technically create as many tabs as you want (subs.php) however, you can only install articles once...   why do you want more than one tab?

My forum is dedicated to Photoshop & Photography and i wanted a tab with articles for each. So they both had one category each and the articles listed below.

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #268 on: May 13, 2009, 06:02:06 AM »
Try this

Open Sources/Subs.php

Find:

Code: [Select]
// [Articles] button
'articles' => array(
'title' => $txt['smfarticles_menu'],
'href' => $scripturl . '?action=articles',
'show' => $context['allow_view_smfarticles'],
'icon' => '',
'sub_buttons' => array(
),
),

(or similar as I may have amended this slightly!)

Replace it with something similar to this...

Code: [Select]
// [Articles1] button
'articles1' => array(
'title' => "Photography Articles",
'href' => $scripturl . '?action=articles;cat=x ',
'show' => $context['allow_view_smfarticles'],
'icon' => '',
'sub_buttons' => array(
),
),
// [Articles2] button
'articles2' => array(
'title' => "PhotoShop Articles",
'href' => $scripturl . '?action=articles;cat=x ',
'show' => $context['allow_view_smfarticles'],
'icon' => '',
'sub_buttons' => array(
),
),

Change the text for whatever you want and change the cat=x to the number of the articles category/ies (go to each category and the id will appear in your browser url bar)

I think that will work

W
« Last Edit: May 13, 2009, 08:02:43 AM by willerby »
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 #269 on: May 13, 2009, 11:09:10 AM »
Thank you i will give that a go as soon as i get home from work. Thank you

Offline mattchewone

  • Jr. Member
  • **
  • Posts: 310
    • PPForums
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #270 on: May 13, 2009, 03:22:38 PM »
I tried this and i got both tabs, but i miss read the part about the cat=x and now i cannot view the articles at all. I deleted all the edits not sure where it has gone funny.

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #271 on: May 13, 2009, 04:10:31 PM »
Try again - it needs a number for the article category in each case.

To avoid editing files back to their original state, save a copy on your server with a tild (~) on the end of the file name, upload your new amended file, check to see what's working and if there are errors just delete the uploaded file and take the tild off the original. That way you can experiment and always get back to where you were.

Go to the pages you want the tabs to link to and look at the url in the browser bar. It will say something like 'http://www.yourforum.com/forum/index.php?action=articles;cat=1'

Change the x in my code (both tabs) to the category number. You can delete the space after that and before the ' apostrophe.

This should work - does for me and I can't see anything on your site that would change this
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 #272 on: May 13, 2009, 04:15:35 PM »
I cannot view the categories so i cannot tell what number they are,

Now i have gone back to the normal Subs.php (how it was before the edit) i cannot access the articles at all by clicking on the tab!

Thanks for the tip with adding the ~ (although i need to learn how to make a copy and add this)

Offline Ann Anderson

  • Newbie
  • *
  • Posts: 4
How to make links live with the articles
« Reply #273 on: May 14, 2009, 04:19:34 AM »
I am on 1.18 and need to know how to make links live. All of my links are dead links in the area. I've used the bb code with the [url] but that have failed to work. thanks for your help.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,466
    • 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 #274 on: May 14, 2009, 10:06:05 AM »
Where are you adding the links? In the article body?
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 laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #275 on: May 14, 2009, 11:51:18 AM »
I cannot view the categories so i cannot tell what number they are,

Now i have gone back to the normal Subs.php (how it was before the edit) i cannot access the articles at all by clicking on the tab!

Thanks for the tip with adding the ~ (although i need to learn how to make a copy and add this)

You will need to get your .../Sources/Subs.php file back to the normal state that has articles in the menu. As you're unsure what edits have taken place best way is to go to the mod page, click on the Parse button and it shows you the following edits need to have taken place in your Subs.php file

Find:

Code: [Select]
$context['allow_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']);

Add After:

Code: [Select]
$context['allow_view_smfarticles'] = allowedTo('view_articles');
      


Find:

Code: [Select]
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
),
),
),

Add After:

Code: [Select]
// [Articles] button
'articles' => array(
'title' => $txt['smfarticles_menu'],
'href' => $scripturl . '?action=articles',
'show' => $context['allow_view_smfarticles'],
'icon' => '',
),


Once you get back to a steady state by checking you have all of these edits exactly as they are above in your subs.php file, you will be able to change the last edit above to the code I have given you.

Hope it works for you.

Always keep a copy of a file you are about to edit so you can go back to it...

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 #276 on: May 14, 2009, 01:01:30 PM »
Thank you Willerby,

The code is all correct i checked that, when i click on the link for the articles, it comes up with the correct code in the URL bar - index.php?action=articles.php

What happens is the articles button gets highlighted as if it is on that page, then it just reloads the forum.

Matt

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,197
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #277 on: May 14, 2009, 04:16:40 PM »
there is an extra .php in that url...
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 #278 on: May 14, 2009, 05:10:41 PM »
As kindred says url link should be action=articles not articles.php

Check the subs.php again...
What type of washing machine is September?

An autumnatic. :)

Offline laetabi

  • Full Member
  • ***
  • Posts: 436
  • Gender: Male
Re: SMF Articles (1.0.2 Released with SMF 2.0 support)
« Reply #279 on: May 14, 2009, 05:13:13 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?
What type of washing machine is September?

An autumnatic. :)