Advertisement:

Author Topic: SMF Articles  (Read 307977 times)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,288
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles
« Reply #940 on: April 29, 2017, 07:45:30 PM »
If the my articles link has no userid included, of course you would see YOUR articles (and guests would see none)

This is correct and appropriate - just like the user profile

In order to share a user's list of articles, he/you would need to include the userid in the 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 brynn

  • Full Member
  • ***
  • Posts: 515
  • Gender: Female
    • Inkscape Community
Re: SMF Articles
« Reply #941 on: May 01, 2017, 04:40:10 PM »
Thanks Kindred  :)

Well this is the link to his My Articles:  http://forum.inkscapecommunity.com/index.php?action=articles;sa=myarticles;u=14

When I follow it, I see my articles.

This is the link to my My Articles:  https://forum.inkscapecommunity.com/index.php?action=articles;sa=myarticles;u=1

When he follows it, he sees his articles.

Edit
We've pretty much concluded that a guest would not be able to see the articles using My Articles link, in any case.  What we need is a way to display a list of a member's articles.

Can anyone think of a way?

Thanks again  :)
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline mysimplesite

  • Semi-Newbie
  • *
  • Posts: 54
Re: SMF Articles. No link in menu after install
« Reply #942 on: August 04, 2017, 01:57:07 AM »
Running 2.0.14, php7, default theme

After successful installion there was no link in the menu bar for Articles. Couldn't add an article.

I created a Category, set permissions but no navigation link for Articles as shown in mod images.

Uninstalleld, reinstalled, no navigation bar.

Any idea what went wrong?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #943 on: August 04, 2017, 08:53:21 AM »
Are you using the default language? You can't see the menu item asn admin?
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 mysimplesite

  • Semi-Newbie
  • *
  • Posts: 54
Re: SMF Articles
« Reply #944 on: August 04, 2017, 09:42:05 AM »
I'm using the default English language for smf and default core theme.

From the Admin menu area I can see the Articles Configuration and its sub-items. There is the Settings which has an Articles url and an Articles Path.

I suppose I can take the Articles URL and make my own link in the main menu bar, but I thought the program would make the menu bar link automatically.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #945 on: August 04, 2017, 09:42:44 AM »
It does add it to the menu by default

You can upload the mod to http://smfhacks.com/smf-package-parser.html and follow the edits and make sure they were applied. Mainly the ones to Subs.php
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 mysimplesite

  • Semi-Newbie
  • *
  • Posts: 54
Re: SMF Articles
« Reply #946 on: August 04, 2017, 11:13:01 AM »
The code was added properly to the subs.php.

I'll check the rest later. I'll be in meetings for about 4 hours from now.

Thanks for your help. Much appreciated.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #947 on: August 04, 2017, 11:43:51 AM »
hmm yeah i would check your themes languges modifications.english.php file as well.
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 mysimplesite

  • Semi-Newbie
  • *
  • Posts: 54
Re: SMF Articles
« Reply #948 on: August 04, 2017, 03:55:12 PM »
Found the problem.

Menu Editor Lite was in conflict somehow with SMF Articles. I uninstalled MEL, reinstalled SMFArtiicles and it worked like a charm.

Now I just have to find another Menu editor.

Thanks for your help, vbgamer45. I appreciate it. Looking forward to enjoying your Articles mod.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #949 on: August 04, 2017, 04:44:52 PM »
Glad you have it working!
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 inkvfd

  • Semi-Newbie
  • *
  • Posts: 35
Re: SMF Articles
« Reply #950 on: August 08, 2017, 11:14:13 PM »
I hope that I am in the right place. Using Forum version: SMF 2.0.14. with SMF Articles   2.5.1a
Is there a way to hide the Edit and the Delete buttons from guest?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #951 on: August 09, 2017, 12:15:43 AM »
They shouldn't be visible unless you gave guests those permissions.
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 inkvfd

  • Semi-Newbie
  • *
  • Posts: 35
Re: SMF Articles
« Reply #952 on: August 09, 2017, 09:11:17 AM »
Here is my print screen of permissions for guest and an Article page.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: SMF Articles
« Reply #953 on: October 05, 2017, 11:01:01 PM »
Is there a way to show a list of articles from one category on a page or a SP block?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #954 on: October 05, 2017, 11:25:52 PM »
I don't have one for SP I did wirite block for ezPortal.

Code i used
Code: [Select]

$rows  = (int) 1;
$articles = (int)  3;
$category = (int)  1;




// Check if articles system is installed

// Load the language files
if (loadlanguage('Articles') == false)
loadLanguage('Articles','english');




$maxrowlevel = $rows;
echo '<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%">
';
//Check what type it is
$query = ' ';
switch($type)
{
case 'recent':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m  ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE  a.approved = 1  ORDER BY a.ID_ARTICLE DESC LIMIT $articles";
break;

case 'viewed':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m  ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1  ORDER BY a.views DESC LIMIT $articles";
break;

case 'mostcomments':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m  ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1  ORDER BY p.commenttotal DESC LIMIT $articles";
break;

case 'toprated':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name,
a.ID_MEMBER, a.description, a.views, a.commenttotal,
(a.rating / a.totalratings ) AS ratingaverage
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m  ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1  ORDER BY ratingaverage DESC LIMIT $articles ";
break;
}
// Execute the SQL query
$dbresult = $smcFunc['db_query']('', $query);
$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
if ($rowlevel == 0)
echo '<tr class="windowbg2">';

echo '<td align="center"><a href="' , $scripturl , '?action=articles;sa=view;article=', $row['ID_ARTICLE'], '">', $row['title'], '</a><br />';
echo '<span class="smalltext">';


if (!empty($modSettings['smfarticles_disp_rating']))
{
echo $txt['smfarticles_crating'],' ' , EzGetStarsByPrecent(($row['totalratings'] != 0) ? ($row['rating'] / ($row['totalratings']* 5) * 100) : 0),'<br />';
}


if (!empty($modSettings['smfarticles_disp_totalcomment']))
echo  $txt['smfarticles_txt_comments'], ' ', $row['commenttotal'], '<br />';


if (!empty($modSettings['smfarticles_disp_views']))
echo $txt['smfarticles_cviews'], ' ', $row['views'], '<br />';

// Check if it was a guest article
if (!empty($modSettings['smfarticles_disp_membername']))
if ($row['real_name'] != '')
echo $txt['ezp_gallery_text_by'],' <a href="', $scripturl, '?action=profile;u=', $row['ID_MEMBER'], '">', $row['real_name'], '</a><br />';
else
echo $txt['ezp_gallery_text_by'],' ', $txt['smfarticles_txtguest'], '<br />';

if (!empty($modSettings['smfarticles_disp_date']))
echo  $txt['smfarticles_cdate'],' ', timeformat($row['date']), '<br />';




echo '</span></td>';


if ($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '</tr>';
$rowlevel = 0;
}
}
if ($rowlevel !=0)
{
echo '</tr>';
}

echo '
      </table><br />';
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 Westwegoman

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: SMF Articles
« Reply #955 on: October 08, 2017, 11:36:36 PM »
Thanks for the code but I get a fatal error when trying this by adding a page to the portal or a block.

Code: [Select]
/community/Sources/Subs-Portal.php(1167) : eval()'d code on line 55

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #956 on: October 08, 2017, 11:54:49 PM »
Before that code try adding
global $smcFunc, $txt, $scripturl;
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 Westwegoman

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: SMF Articles
« Reply #957 on: October 09, 2017, 12:04:17 AM »
Ok. I’ll give it a try tomorrow. Thanks for the help.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: SMF Articles
« Reply #958 on: October 10, 2017, 10:41:56 PM »
No more errors but it also doesn't show the article list.

Get the following error now.

Code: [Select]
http://www.segnette.com/community/index.php?/page,hunting_articles.html
Apply Filter: Only show the errors with the same message
2: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given
Apply Filter: Only show the errors from this file
File: /Sources/Subs-Portal.php(1167) : eval()'d code
Line: 58

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,510
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles
« Reply #959 on: October 10, 2017, 11:27:24 PM »
Also set above it
$type = 'recent'';
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