Advertisement:

Author Topic: SMF Articles  (Read 307928 times)

Offline ApplianceJunk

  • SMF Hero
  • ******
  • Posts: 3,487
    • ApplianceJunk.com
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #780 on: May 06, 2012, 09:08:17 AM »
Great mod - thank you!

I'd like to remove the date and views from the actual article header (but keep the 'Submitted By'). Is that possible? Which code should I remove or alter?

It would be in themes/default/Articles.template.php

Thanks, I found that, but unfortunately I'm not a coder; I need to be pointed to the actual code to remove.

I wanted to do the same thing.
I found and removed this code in themes/default/Articles.template.php

Code: [Select]
echo '<tr class="windowbg">
<td><span class="smalltext"><b>',$txt['smfarticles_submittedby2'],'</b>', '
<a href="',$scripturl, '?action=profile;u=',$context['article']['ID_MEMBER'],'">', $context['article']['real_name'], '</a>
<b>',$txt['smfarticles_date2'],'</b> ',

timeformat($context['article']['date']), '

<b>',$txt['smfarticles_views2'],'</b> ',

$context['article']['views'], '

</span>
</td>
</tr>';

Offline ApplianceJunk

  • SMF Hero
  • ******
  • Posts: 3,487
    • ApplianceJunk.com
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #781 on: May 06, 2012, 10:10:00 AM »
I'm trying to learn how to remove the link tree and search button shown on the article page in the attachment.

I'm looking in themes/default/Articles2.template.php but can't seem to find the right code.

Any help would be greatly appreciated.

Thanks,

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #782 on: May 06, 2012, 01:52:56 PM »
In the sources folder in articles.php
This code controls the linktree
Code: [Select]
// Setup the Link Tree
$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);

GetParentLink($cat);


For the top bar with search controlled by this call
ShowArticlesBar();
In the articles2.template.php in themes/default folder
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 ApplianceJunk

  • SMF Hero
  • ******
  • Posts: 3,487
    • ApplianceJunk.com
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #783 on: May 06, 2012, 06:07:46 PM »
To remove the link tree I found this code instead in Sources/articles.php

Code: [Select]
// Link Tree

$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);

GetParentLink($context['article']['ID_CAT']);



$dbresult = $smcFunc['db_query']('', "
SELECT
pagetext
FROM {db_prefix}articles_page
WHERE ID_ARTICLE = $article LIMIT 1");
$row2 = $smcFunc['db_fetch_assoc']($dbresult);
$context['article_page'] = $row2;
$smcFunc['db_free_result']($dbresult);

and commented out this part.

Code: [Select]
/*
$context['linktree'][] = array(
'url' => $scripturl . '?action=articles',
'name' => $txt['smfarticles_title']
);

GetParentLink($context['article']['ID_CAT']);

*/

I tried first playing around with the code you posted, but I could not seem to get the link tree removed by removing any of that code.
Should what I did above effect anything other then removing the article link tree?

Thanks for the help,

Edited to add:

Quote
For the top bar with search controlled by this call
ShowArticlesBar();
In the articles2.template.php in themes/default folder

That worked perfect for me.

Thanks again.
« Last Edit: May 06, 2012, 06:26:12 PM by ApplianceJunk »

Offline SMFHacks.com Team

  • Full Member
  • ***
  • Posts: 440
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #784 on: June 09, 2012, 04:16:44 PM »
Update
2.0.1
!Fixed possible undefined error on the search page
+Added future integration support for Badge Awards
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline Manicred

  • Semi-Newbie
  • *
  • Posts: 39
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #785 on: August 04, 2012, 05:49:21 AM »
How do you publish articles to the front page of the site? I am using Simpleportal. Thanks.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #786 on: August 04, 2012, 12:09:40 PM »
Would require a custom php block to fetch article information.
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 mageguild

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
    • The world's all-purpose Tennis discussion message boards for tennis enthusiasts.
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #787 on: August 12, 2012, 07:52:06 PM »
I would like to uninstall this mod from my site.  When I do, I get no errors.  However, the Articles Configuration link in the admin remains behind and all articles errors start giving fatal errors (EG:  http://www.thetennisbulletin.com/forums/articles/sa=view;article=13)

Fatal error: require_once() [function.require]: Failed opening required '/home/tbassett/webapps/thetennisbulletin/forums/Sources/Articles2.php' (include_path='.:/usr/local/lib/php') in /home/tbassett/webapps/thetennisbulletin/forums/index.php on line 371

Can anyone suggest anything to resolve this?

Offline mageguild

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
    • The world's all-purpose Tennis discussion message boards for tennis enthusiasts.
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #788 on: August 12, 2012, 07:54:14 PM »
I would like to uninstall this mod from my site.  When I do, I get no errors.  However, the Articles Configuration link in the admin remains behind and all articles errors start giving fatal errors (EG:  http://www.thetennisbulletin.com/forums/articles/sa=view;article=13)

Fatal error: require_once() [function.require]: Failed opening required '/home/tbassett/webapps/thetennisbulletin/forums/Sources/Articles2.php' (include_path='.:/usr/local/lib/php') in /home/tbassett/webapps/thetennisbulletin/forums/index.php on line 371

Can anyone suggest anything to resolve this?

I have had to re-install this mod to resolve all these fatal errors which is why my example link above now works.  I have attached a screenshot of the error. 

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,278
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #789 on: August 12, 2012, 08:35:46 PM »
looks like ti's not completely uninstalling, obviously. :P

you'll have to manually check files to confirm removal of the code
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 SMFHacks.com Team

  • Full Member
  • ***
  • Posts: 440
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #790 on: August 25, 2012, 12:12:43 PM »
2.0.2
!Fixed top articles bar layout issue in chrome for SMF 2.0
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline Apllicmz

  • SMF Hero
  • ******
  • Posts: 2,641
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #791 on: October 08, 2012, 01:29:07 PM »
Thanks
when Update dont forget portuguese file

Code: [Select]
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
    <operation error="ignore">
        <search position="after"><![CDATA[?>]]></search>
        <add><![CDATA[
// Begin SMF Articles Text Strings translate by Candidosa2
$txt['smfarticles_menu'] = 'Artigos';
$txt['smfarticles_admin'] = 'Configura&ccedil;&atilde;o dos artigos';

$txt['smfarticles_articlessettings'] = 'Defini&ccedil;&otilde;es';
$txt['smfarticles_approvearticles'] = 'Aprovar artigos';
$txt['smfarticles_form_approvecomments'] = 'Aprovar Coment&aacute;rios';
$txt['smfarticles_catpermlist'] = 'Lista de Permiss&atilde;o da categoria';
$txt['smfarticles_txt_import'] = 'Importar';

$txt['permissiongroup_smfarticles'] = 'SMF Artigos';
$txt['permissiongroup_simple_smfarticles'] = 'SMF Artigoss';

$txt['permissionname_view_articles'] = 'Ver artigos';
$txt['permissionhelp_view_articles'] = 'Define se o utilizador pode visualizar os artigos.';
$txt['cannot_view_articles'] = 'Voc&ecirc; n&atilde;o pode exibir a p&aacute;gina de Os artigos.';

$txt['permissionname_add_articles'] = 'Adicionar artigo';
$txt['permissionhelp_add_articles'] = 'Se o utilizador pode enviar artigos';

$txt['cannot_add_articles'] = 'Voc&ecirc; n&atilde;o pode adicionar artigos.';
$txt['permissionname_edit_articles'] = 'Editar artigos pr&oacute;prios';
$txt['permissionhelp_edit_articles'] = 'Se o utilizador pode parar de editar os artigos';

$txt['cannot_edit_articles'] = 'Voc&ecirc; n&atilde;o pode editar Os artigos.';
$txt['permissionname_delete_articles'] = 'Apagar artigos pr&oacute;prios';
$txt['permissionhelp_delete_articles'] = 'Se o utilizador pode apagar artigos';
$txt['cannot_delete_articles'] = 'N&atilde;o &eacute; poss&iacute;vel apagar Os artigos.';

$txt['permissionname_articles_comment'] = 'Deixe coment&aacute;rios';
$txt['permissionhelp_articles_comment'] = 'Permite ao utilizador deixar coment&aacute;rios em um artigo.';
$txt['cannot_articles_comment'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para deixar coment&aacute;rios.';


$txt['permissionname_articles_auto_approve'] = 'Aprovados os artigos automaticamente';
$txt['permissionhelp_articles_auto_approve'] = 'Se os artigos dos utilizadores s&atilde;o auto aprovado quando submetidas.';

$txt['permissionname_articles_autocomment'] = 'Auto aprovar os coment&aacute;rios';
$txt['permissionhelp_articles_autocomment'] = 'Coment&aacute;rios n&atilde;o precisa esperar pela aprova&ccedil;&atilde;o.';

$txt['permissionname_rate_articles'] = 'Artigos Classifique';
$txt['permissionhelp_rate_articles'] = 'Se o utilizador pode clasifcar Os artigos';
$txt['cannot_rate_articles'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para classificar os artigos.';

$txt['permissionname_articles_admin'] = 'Administra&ccedil;&atilde;o de artigos';
$txt['permissionhelp_articles_admin'] = 'Utilizador pode gerir os artigos';
$txt['cannot_articles_admin'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para gerir os artigos.';
// END SMF Articles Strings     Support PT SMFPT   
]]></add>
    </operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
    <operation error="ignore">
        <search position="after"><![CDATA[?>]]></search>
        <add><![CDATA[
// Begin SMF Articles Text Strings translate by Candidosa2
$txt['smfarticles_menu'] = 'Artigos';
$txt['smfarticles_admin'] = 'Configura&ccedil;&atilde;o dos artigos';

$txt['smfarticles_articlessettings'] = 'Defini&ccedil;&otilde;es';
$txt['smfarticles_approvearticles'] = 'Aprovar artigos';
$txt['smfarticles_form_approvecomments'] = 'Aprovar Coment&aacute;rios';
$txt['smfarticles_catpermlist'] = 'Lista de Permiss&atilde;o da categoria';
$txt['smfarticles_txt_import'] = 'Importar';

$txt['permissiongroup_smfarticles'] = 'SMF Artigos';
$txt['permissiongroup_simple_smfarticles'] = 'SMF Artigoss';

$txt['permissionname_view_articles'] = 'Ver artigos';
$txt['permissionhelp_view_articles'] = 'Define se o utilizador pode visualizar os artigos.';
$txt['cannot_view_articles'] = 'Voc&ecirc; n&atilde;o pode exibir a p&aacute;gina de Os artigos.';

$txt['permissionname_add_articles'] = 'Adicionar artigo';
$txt['permissionhelp_add_articles'] = 'Se o utilizador pode enviar artigos';

$txt['cannot_add_articles'] = 'Voc&ecirc; n&atilde;o pode adicionar artigos.';
$txt['permissionname_edit_articles'] = 'Editar artigos pr&oacute;prios';
$txt['permissionhelp_edit_articles'] = 'Se o utilizador pode parar de editar os artigos';

$txt['cannot_edit_articles'] = 'Voc&ecirc; n&atilde;o pode editar Os artigos.';
$txt['permissionname_delete_articles'] = 'Apagar artigos pr&oacute;prios';
$txt['permissionhelp_delete_articles'] = 'Se o utilizador pode apagar artigos';
$txt['cannot_delete_articles'] = 'N&atilde;o &eacute; poss&iacute;vel apagar Os artigos.';

$txt['permissionname_articles_comment'] = 'Deixe coment&aacute;rios';
$txt['permissionhelp_articles_comment'] = 'Permite ao utilizador deixar coment&aacute;rios em um artigo.';
$txt['cannot_articles_comment'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para deixar coment&aacute;rios.';


$txt['permissionname_articles_auto_approve'] = 'Aprovados os artigos automaticamente';
$txt['permissionhelp_articles_auto_approve'] = 'Se os artigos dos utilizadores s&atilde;o auto aprovado quando submetidas.';

$txt['permissionname_articles_autocomment'] = 'Auto aprovar os coment&aacute;rios';
$txt['permissionhelp_articles_autocomment'] = 'Coment&aacute;rios n&atilde;o precisa esperar pela aprova&ccedil;&atilde;o.';

$txt['permissionname_rate_articles'] = 'Artigos Classifique';
$txt['permissionhelp_rate_articles'] = 'Se o utilizador pode clasifcar Os artigos';
$txt['cannot_rate_articles'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para classificar os artigos.';

$txt['permissionname_articles_admin'] = 'Administra&ccedil;&atilde;o de artigos';
$txt['permissionhelp_articles_admin'] = 'Utilizador pode gerir os artigos';
$txt['cannot_articles_admin'] = 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para gerir os artigos.';
// END SMF Articles Strings     Support PT SMFPT   
]]></add>
    </operation>
</file>



Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #792 on: October 08, 2012, 02:26:12 PM »
Thanks translation will include it in next one.
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 ollybaba

  • Newbie
  • *
  • Posts: 8
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #793 on: October 10, 2012, 12:56:38 AM »
Hi, I'd like to allow users to have permission to post and edit articles based on post-count-based membergroups, not regular membergroups. Is there a way to do that? The only groups showing up in my permissions settings for this plugin are the regular membergroups.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #794 on: October 10, 2012, 12:57:53 AM »
Not at the moment.
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 ollybaba

  • Newbie
  • *
  • Posts: 8
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #795 on: October 10, 2012, 03:10:04 AM »
So then, there's no way to automatically allow anyone to add or edit articles? An administrator has to add them to a membergroup manually before they can have that ability?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #796 on: October 10, 2012, 07:48:08 AM »
You would use the regular members permissions in the membergroup settings to setup the permissions for adding/editing articles etc.
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 Vincent Volmer

  • Jr. Member
  • **
  • Posts: 218
  • Gender: Male
  • SMF2.0.18
    • digiscrapdigitaalscrappen on Facebook
    • @Digiscrap_NL on Twitter
    • Digiscrap Digitaal scrappen
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #797 on: February 12, 2013, 09:16:32 AM »
Hello SMF Hacks,

Could you please fix the 'share on Facebook' button? It's not working correct (same issue as there was in the Gallery??).
It likes the website, not the article.

Thanks,
Vincent

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,506
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #798 on: February 12, 2013, 12:45:42 PM »
Hello SMF Hacks,

Could you please fix the 'share on Facebook' button? It's not working correct (same issue as there was in the Gallery??).
It likes the website, not the article.

Thanks,
Vincent
What error are you getting?

I am not using the share button in the articles system but instead the like code.
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 Vincent Volmer

  • Jr. Member
  • **
  • Posts: 218
  • Gender: Male
  • SMF2.0.18
    • digiscrapdigitaalscrappen on Facebook
    • @Digiscrap_NL on Twitter
    • Digiscrap Digitaal scrappen
Re: SMF Articles (2.0 Released with SMF 2.0 support!)
« Reply #799 on: February 12, 2013, 01:26:28 PM »
What error are you getting?

I am not using the share button in the articles system but instead the like code.

You are right (of course ;) ) it is the "Like" button.

Issue is, when I 'Like' an article it does not 'Like' the article ( in our case: digiscrap.nl/articles/overig-digitaal-scrappen/digiscrap-dutch-choice/65 ) but it Likes the website only (digiscrap.nl) on Facebook, not the article. Tweet on Twitter works OK!

Maybe you can change the Like button into the Share button? ....