News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Articles

Started by SMFHacks.com Team, September 04, 2008, 04:03:00 PM

Previous topic - Next topic

Kindred

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
Слaва
Украинi

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."

brynn

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  :)

mysimplesite

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?

vbgamer45

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

mysimplesite

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.

vbgamer45

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

mysimplesite

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.

vbgamer45

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

mysimplesite

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.

vbgamer45

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

inkvfd

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?

vbgamer45

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

inkvfd

Here is my print screen of permissions for guest and an Article page.

Westwegoman

Is there a way to show a list of articles from one category on a page or a SP block?

vbgamer45

I don't have one for SP I did wirite block for ezPortal.

Code i used


$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

Westwegoman

Thanks for the code but I get a fatal error when trying this by adding a page to the portal or a block.

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

vbgamer45

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

Westwegoman

Ok. I'll give it a try tomorrow. Thanks for the help.

Westwegoman

No more errors but it also doesn't show the article list.

Get the following error now.


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

vbgamer45

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

Advertisement: