Advertisement:

Author Topic: SMF Articles  (Read 308927 times)

Offline Minare

  • Sophist Member
  • *****
  • Posts: 1,233
  • Gender: Male
  • Yapayalnız Kalmak İskelelerde !
    • Meryemce
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #360 on: July 21, 2009, 05:32:32 PM »
vbgamer, how will we update it? ( without losing existing db )
O güzel Râsulu Yesrip yolunda
Hicret coşkusuyla aramalısın
Ayrılık Anne'den Baba'dan Yâr'dan
Ezelden geçerek kavuşmalısın

http://www.meryemce.biz

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #361 on: July 22, 2009, 08:53:40 AM »
Just upgrade to the latest release. Uninstalling does not delete database entries
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 ttuu

  • Jr. Member
  • **
  • Posts: 224
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #362 on: July 22, 2009, 12:42:13 PM »
i try to attach image in article i cannot see the image in the article view.
if i try to edit article i see in bottum page X in image place.
i see the "function ViewArticle" code:
Code: [Select]
function ViewArticle()
{
global $txt, $context, $ID_MEMBER, $scripturl, $db_prefix, $mbname, $user_info;

// Check if the current user can view the articles list
isAllowedTo('view_articles');

$m_cats = allowedTo('articles_admin');
$context['m_cats'] = $m_cats;

if (!isset($_REQUEST['article']))
fatal_error($txt['smfarticles_noarticleselected']);

$article = (int) $_REQUEST['article'];

if ($context['user']['is_guest'])
$groupid = -1;
else
$groupid =  $user_info['groups'][0];

// Show the articles in that category
$dbresult = db_query("
SELECT
a.ID_ARTICLE, a.title, a.date, p.view, a.approved, a.rating, a.totalratings, m.realName, a.ID_MEMBER,
a.description, a.views, a.commenttotal, a.ID_CAT 
FROM {$db_prefix}articles AS a
LEFT JOIN {$db_prefix}members AS m  ON (a.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {$db_prefix}articles_catperm AS p ON (p.ID_GROUP = $groupid AND a.ID_CAT = p.ID_CAT) 
WHERE a.ID_ARTICLE = $article LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
$context['article'] = $row;
mysql_free_result($dbresult);

// Check Approval
if ($row['approved'] == 0 && $m_cats == false && $row['ID_MEMBER'] != $ID_MEMBER)
fatal_error($txt['smfarticles_err_articlenotapproved'],false);

// Check if article is allowed to be viewed
if ($row['view'] == '0' && ($m_cats == false && $row['ID_MEMBER'] != $ID_MEMBER))
fatal_error($txt['smfarticles_perm_no_view_article'],false);

$addarticle = allowedTo('add_articles');

// MyArticles
if ($addarticle && !($context['user']['is_guest']))
$context['articles']['buttons']['mylisting'] =  array(
'text' => 'smfarticles_myarticles',
'url' =>$scripturl . '?action=articles;sa=myarticles;u=' . $ID_MEMBER,
'lang' => true,

);

// Search
$context['articles']['buttons']['search'] =  array(
'text' => 'smfarticles_search',
'url' => $scripturl . '?action=articles;sa=search',
'lang' => true,

);


// View Article Buttons

// Edit Article
if ($m_cats == true  || $row['ID_MEMBER'] == $ID_MEMBER)
$context['articles']['view_article']['edit'] =  array(
'text' => 'smfarticles_txtedit3',
'url' =>$scripturl . '?action=articles;sa=editarticle&id=' . $article,
'lang' => true,

);

// Delete Article
if ($m_cats == true  || $row['ID_MEMBER'] == $ID_MEMBER)
$context['articles']['view_article']['delete'] =  array(
'text' => 'smfarticles_txtdel3',
'url' => $scripturl . '?action=articles;sa=deletearticle&id=' . $article,
'lang' => true,

);

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

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


$dbresult = db_query("
SELECT
pagetext
FROM {$db_prefix}articles_page
WHERE ID_ARTICLE = $article LIMIT 1", __FILE__, __LINE__);
$row2 = mysql_fetch_assoc($dbresult);
$context['article_page'] = $row2;
mysql_free_result($dbresult);

// Display all user comments
$dbresult = db_query("
SELECT
c.ID_ARTICLE, c.ID_COMMENT, c.date, c.comment, c.ID_MEMBER, c.lastmodified,
c.modified_ID_MEMBER, m.posts, m.realName, c.approved
FROM ({$db_prefix}articles_comment as c)
LEFT JOIN {$db_prefix}members AS m ON (c.ID_MEMBER = m.ID_MEMBER)
WHERE c.ID_ARTICLE = " . $context['article']['ID_ARTICLE'] . " AND c.approved = 1   ORDER BY c.ID_COMMENT DESC", __FILE__, __LINE__);
$comment_count = db_affected_rows();
$context['article_comments'] = array();
while($row3 = mysql_fetch_assoc($dbresult))
$context['article_comments'][] = $row3;

mysql_free_result($dbresult);

$context['article_comment_count'] = $comment_count;

// Update Views
$dbresult = db_query("UPDATE {$db_prefix}articles
SET views = views + 1 WHERE ID_ARTICLE = $article LIMIT 1", __FILE__, __LINE__);

$context['page_title'] = $mbname . ' - ' . $txt['smfarticles_title'] . ' - ' . $row['title'];

$context['sub_template']  = 'viewarticle';
}

i cannot see relevant code for attachment.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #363 on: July 22, 2009, 01:54:23 PM »
There is no code on the view article page for that.  On the edit article page. You have the option to insert a link to the attachment image in the article description editor.
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 ttuu

  • Jr. Member
  • **
  • Posts: 224
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #364 on: July 22, 2009, 02:04:39 PM »
sorry. I do not understand you

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #365 on: July 22, 2009, 02:13:40 PM »
On the edit article page you have the option to attach images to the article.
To get the images to appear in the article after they are attached you can double click the image and it will be added to the article text where your cursor is at. For SMF 2.0 you have to drag and drop the image.
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 ttuu

  • Jr. Member
  • **
  • Posts: 224
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #366 on: July 22, 2009, 03:56:04 PM »
On the edit article page you have the option to attach images to the article.
To get the images to appear in the article after they are attached you can double click the image and it will be added to the article text where your cursor is at. For SMF 2.0 you have to drag and drop the image.

in the image place i see X.
in the article folder i cannot see the file.
How do I get the image to appear as part of the article?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #367 on: July 22, 2009, 04:41:05 PM »
What settings do you have. Admin -> Articles Configuration -> Settings
For the Articles path and Articles url
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 ttuu

  • Jr. Member
  • **
  • Posts: 224
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #368 on: July 23, 2009, 03:44:27 AM »
http://ladaat.net/forum/articles/

&

/hsphere/local/home/ladaatne/ladaat.net/forum/articles/

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #369 on: July 23, 2009, 03:02:51 PM »
That looks right. Any errors in the error log?
What do the links of the broken images look like.
Also what version of SMF
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 ttuu

  • Jr. Member
  • **
  • Posts: 224
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #370 on: July 23, 2009, 05:56:32 PM »
That looks right. Any errors in the error log?
What do the links of the broken images look like.
Also what version of SMF
ok
in log i see this errores:
Code: [Select]
http://ladaat.net/forum/index.php?action=articles;sa=editarticle2 
2: rename(/hsphere/local/home/ladaatne/ladaat.net/forum/articles/3080_24_07_09_12_50_55.jpeg_thumb,/hsphere/local/home/ladaatne/ladaat.net/forum/articles/thumb_3080_24_07_09_12_50_55.jpeg): No such file or directory
Files: /hsphere/local/home/ladaatne/ladaat.net/forum/Sources/Articles.php
Line: 883
2: getimagesize(/hsphere/local/home/ladaatne/ladaat.net/forum/articles/3080_24_07_09_12_50_55.jpeg): failed to open stream: No such file or directory
Files: /hsphere/local/home/ladaatne/ladaat.net/forum/Sources/Subs-Graphics.php
Line: 269
2: move_uploaded_file(): Unable to move '/tmp/phpwG9XJF' to '/hsphere/local/home/ladaatne/ladaat.net/forum/articles/3080_24_07_09_12_50_55.jpeg'
Files: /hsphere/local/home/ladaatne/ladaat.net/forum/Sources/Articles.php
Line: 879
2: move_uploaded_file(/hsphere/local/home/ladaatne/ladaat.net/forum/articles/3080_24_07_09_12_50_55.jpeg): failed to open stream: Permission denied
Files: /hsphere/local/home/ladaatne/ladaat.net/forum/Sources/Articles.php
Line: 879
in the edit article page the broken link is:
http://ladaat.net/forum/articles/thumb_3080_24_07_09_12_50_55.jpeg

i using SMF v.1.1.10

thanks for your help

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #371 on: July 23, 2009, 09:28:13 PM »
Make sure the permissions on the articles folder are writable i think either 755 or 777 will work
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 willerby

  • Full Member
  • ***
  • Posts: 445
  • Gender: Male
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #372 on: July 27, 2009, 04:23:21 PM »
Latest verison of this mod installed on SMF 2.0 RC1.2 - member just tried a search using MemberName and got this error...

Unknown column 'memberName' in 'where clause'
File: /home2/.../public_html/forum/Sources/Articles2.php
Line: 2130

One for next release or is it something wrong with my install?

W
What type of washing machine is September?

An autumnatic. :)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #373 on: July 27, 2009, 04:39:53 PM »
Will fix for next release. Should be member_name instead of MemberName for SMF 2.0
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 willerby

  • Full Member
  • ***
  • Posts: 445
  • Gender: Male
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #374 on: July 27, 2009, 04:43:40 PM »
Thanks vbgamer...
What type of washing machine is September?

An autumnatic. :)

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #375 on: July 27, 2009, 08:08:07 PM »
Thanks vbgamer...
Version 1.1.1
!Fixed search for SMF 2.0
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 willerby

  • Full Member
  • ***
  • Posts: 445
  • Gender: Male
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #376 on: July 28, 2009, 05:22:48 PM »
Fast response... thanks
What type of washing machine is September?

An autumnatic. :)

Offline S.Nieves

  • Jr. Member
  • **
  • Posts: 107
  • Gender: Male
  • Its a dogs world!
    • Dog Forum
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #377 on: July 30, 2009, 01:23:35 AM »
Quick question.  Can I add HTML type text here so that my google ads come up? I imported articles from Tiny portal and they all look incorrect.

Sam

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,595
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #378 on: July 30, 2009, 08:58:35 AM »
No only supports BBC articles
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 Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,422
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF Articles (1.1 Released with SMF 2.0 support)
« Reply #379 on: July 30, 2009, 10:08:12 AM »
actually, if you have direct database access, you can put HTML directly in the article contents field...   as long as you do not edit the article in the future, it will work

(all of my imported mambo articles used html)
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."