News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Articles

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

Previous topic - Next topic

IzzySoft

another minor thing...

Description disappears when i press [Edit]



Is this just happening for me? :p

Any hacks you already added to address the Description not showing would be great. :)

Thanks.

vbgamer45

What SMF version and what browser?
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

IzzySoft

#922
Quote from: vbgamer45 on July 03, 2016, 09:33:01 PM
What SMF version and what browser?

SMF ver 2.0.11




IzzySoft

I think the culprit lies here?



Wait... where is the 'title'?

Doesn't the title go into the 'id'?


// Now create the editor.
$editorOptions = array(
'id' => 'title',
'value' => 'descript',
'width' => '90%',
'form' => 'catform',
'labels' => array(
'editcat' => $txt['smfarticles_editcat']
),
);


'id' => 'title',
'value' => 'descript',

Ehhh, i know not what to do. :p
Help?! :)

IzzySoft

#924
Wait.. i think i got it.

function i updated in Articles2.php

function EditCat()
{
global $context, $mbname, $txt, $smcFunc, $sourcedir;

// Check if they can add categories
isAllowedTo('articles_admin');

$cat = (int) $_REQUEST['cat'];
// Check if an article was selected
if (empty($cat))
fatal_error($txt['smfarticles_nocatselected']);

/*
// Needed for the WYSIWYG editor.
require_once($sourcedir . '/Subs-Editor.php');

// Now create the editor.
$editorOptions = array(
'id' => 'descript',
'value' => '',
'width' => '90%',
'form' => 'catform',
'labels' => array(
'editcat' => $txt['smfarticles_editcat']
),
);
create_control_richedit($editorOptions);
$context['post_box_name'] = $editorOptions['id'];
*/

// Load the subtemplate for the category
$context['sub_template']  = 'editcat';

// Set the page title
$context['page_title'] = $mbname  . ' - ' .  $txt['smfarticles_title'] . ' - ' . $txt['smfarticles_editcat'];

$dbresult = $smcFunc['db_query']('', "
SELECT
ID_CAT, title, roworder, ID_PARENT
FROM {db_prefix}articles_cat ORDER BY title ASC");
$context['articles_cat'] = array();
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
// Can't be a parent of itself
if ($row['ID_CAT'] == $cat)
continue;

$context['articles_cat'][] = $row;
}
$smcFunc['db_free_result']($dbresult);

CreateArticlesPrettryCategory();

// Get category information
$dbresult = $smcFunc['db_query']('', "
SELECT
ID_CAT, title, description, imageurl, ID_PARENT
FROM {db_prefix}articles_cat
WHERE ID_CAT = $cat");
$row = $smcFunc['db_fetch_assoc']($dbresult);
$smcFunc['db_free_result']($dbresult);
$context['articles_data'] = $row;


// Needed for the WYSIWYG editor.
require_once($sourcedir . '/Subs-Editor.php');

// Now create the editor.
$editorOptions = array(
'id' => 'descript',
'value' => $context['articles_data']['description'],
'width' => '90%',
'form' => 'catform',
'labels' => array(
'editcat' => $txt['smfarticles_editcat']
),
);
create_control_richedit($editorOptions);
$context['post_box_name'] = $editorOptions['id'];
}


phew... ;D

vbgamer45

What did you update changing to get it to 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

IzzySoft


// Needed for the WYSIWYG editor.
require_once($sourcedir . '/Subs-Editor.php');

// Now create the editor.
$editorOptions = array(
'id' => 'descript',
'value' => '',
'width' => '90%',
'form' => 'catform',
'labels' => array(
'editcat' => $txt['smfarticles_editcat']
),
);
create_control_richedit($editorOptions);
$context['post_box_name'] = $editorOptions['id'];


moved to end of function, and changed...

'value' => '',
   ...to...
'value' => $context['articles_data']['description'],

:)

vbgamer45

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

IzzySoft

Thank you for working on this Mod.

And from what little i saw browsing here, thank you for helping everyone out when you have a free minute.

Very much appreciated. ;D

vbgamer45

Strange I checked my mod code and I had
'value' => $row['description'],

In the code so maybe you changed some files?
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

IzzySoft



you might be right. I installed most Mods from the SMF Package Manager. ;)

Siirist

Hello,

I installed this under the advice of Kindred.

I know nothing about this, other than it creates a method of creating, approving, sorting, editing, and deleting articles.

I looked at the permissions and it is straight forward about what is permitted and what is not based on membergroup.

I do not believe that this is going to work for me, because when adjusting permissions, it allows all regular members to do something.

My preferences are that a lower post-count membergroup can view articles, but cannot post/create them, and higher post-count membergroups can post/create them.

This provides incentive for members to post. At least that is the way I see it.

To facilitate my desires, I have created boards that members can see, but are read-only, then as a child-board, higher post-count membergroups can "submit" articles (lower post-count membergroups cannot see this board) and the submissions are viewed by the Staff and either approved (moved to the parent board), or are not approved and moved to the Recycle Bin.

Am I way off here, or is my thinking sound?

Be Well,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Kindred

of course it allows that....  you just have to turn off ("disallow") permissions for the regular members group and then ALLOW for the post-count based groups.
I use exactly that setup on 40konline.

Old-time members are allowed to post articles - must be approved by an admin
all members are allowed to read articles.

These are the permissions...
View Articles          
Add Article          
Edit own Articles          
Delete own Articles          
Rate Articles          
Leave Comments          
Articles Auto Approved          
Auto Approve Comments          
Admin Articles


If auto-approve is not allowed, then the article or comment must be approved by someone with Admin Articles permission
Сл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."

Siirist

Kindred,

Thank you so much for this detailed clarification.   :)

I discussed this and the Knowledge Base mod with the forum owner, and she is not interested at this time due to the "newness" of the forum.

I have un-installed, but they remain up-loaded for future use should the need arise.

As always, I appreciate your words.

Be Well,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Hondo

Hello,
first thank you for this mod.
Does anybody has a german translation of this mod?

Thanks!
Andreas

vbgamer45

Not sure you can try searching this topic.
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

MrMike

Quote from: Hondo on August 04, 2016, 01:36:31 PM
Does anybody has a german translation of this mod?

I've made some passable translations of a few mods using Google Translate, pasting the strings in and then copying them into a new language file. They aren't perfect but in most cases they're good enough to be understandable.

Also, there are some forums like http://linguaholic.com that can help you with translations.

Hondo

Hi vbgamer45,
I have tried the Search.
I searched to "german", "deutsche" and "translation"
I don't find anything suitable.

@ MrMike,
Its not the problem to translate it - it is a problem of time I need for this.

Thanks anyway
Andreas

MrMike

Quote from: Hondo on August 04, 2016, 03:41:06 PM
Its not the problem to translate it - it is a problem of time I need for this.

Unless there are a ton of strings it shouldn't take more than a couple of hours to do it in google. It might not be a perfect translation but it'll usually be good enough to use.

brynn

Hi Friends,
A member just alerted me to the fact that people who are not logged in (guest or member) can't view a list of articles by that user, if the user gives them a link to My Articles.  We have figured out that that particular button only displays the articles of the person who clicks it.  So if I follow the link he provided for his My Articles, I only see my articles.

It does seem reasonable that people not logged in, and even guests should be able to see the list (if the permission is set that way, which it is).  I would expect all the editing buttons to be grayed out or missing.  But the list with links, just to read the articles, I'm not sure why it's blocked.

We're banging our heads trying to find a way for one member to show a list of all his articles, which are scattered through a few different categories, on one page.

The forum search doesn't search articles.  The article search won't search by username, with the search field blank.  And how can you fill in a 3 letter search term and be sure it will find all the member's articles?  Even if you wanted to use google, his articles are scattered through categories, so you'd have to search each category, wouldn't you?  Or is there a way to use google, and only have articles, or at least all his articles at the top, in the results?

Any ideas?

Thank you very much   :)

Advertisement: