By Sunny on Tuesday, 23 September 2014
Posted in General Issues
Likes 0
Views 726
Votes 0
Hi Mark,

Thank you for the update on this thread , as it was Komento thread, i'm reposting in Easy Discuss Thread.

Using Komento is out of question now for me because of moderation limitations. As a fall back i'm exploring Easy discuss now.

The work flow i plan is as below:

1) Create a category with rights of creating thread only to super user
2) Create 6000 threads as super user (So that these threads act as articles)
3) Allow comments and discussions on the above fixed 6000 threads
4) No Member is allowed to create a new thread, they are only allowed to comment with the help of ACL in ED or permissions in category

Now I had two questions:
1) If i create these fixed 6000 threads, they show the author details on the left with avatar, PM & link to easysocial profile. Is there anyway i can remove this only for the author of the post. (There would be no new authors, only comentors). The avatar and PM of comentors is needed.

2) Is there anyway i can insert PHP code in the post? (In joomla articles i had Sourcerer triggering the variable which was stored in the article to showcase the current price of the stockmarket) But in Easy discuss form if i enter sourcerer tag it breaks the site.

I know its a hack, but basically because of Kommento moderation limitations, ED is the best choice for me to achieve discussions.

looking forward for your advise, if needed i can open a ticket as well.

regards
Hello Sunny,

For your first requirement, please replace the attached file in: ../components/com_easydiscuss/themes/simplistic/post.question.item.php. As for the second question, Can you elaborate more on it. And how it should be called. We will try to find a way to make it possible. Can you provide us your backend and FTP access so we can have a better look on your issue here? Please advise.
·
Tuesday, 23 September 2014 17:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nick,
Many thanks for your reply, the solution was perfect.
I also edited frontpage.post.php so that on the front list page the author details are removed, and also search.item.php so that the search does not show the author details (Override folder in tempates/mytemplate/com_easydiscuss)

Now i just need to find out a way to mass upload all the 6000 articles, with phpmyadmin:)

regarding my second question.
In my article i'm using sourcerer by nonumber.nl, which basically passes the variables into a php script and the php script parses the query and shows the latest price of that particular stock.

example:
{source}[[?php $stockcode = 'GOOG' require_once JPATH_SITE.'/stocks/getquote.php'; ?]]{/source}

getquote.php basically echoes the quote of $stockcode from database.

Now if i insert
{source}[[?php $stockcode = 'GOOG' require_once JPATH_SITE.'/stocks/getquote.php'; ?]]{/source}
in the body of the thread, the site breaks. (I guess its not hounouring the sourcerer plugin parameters)

I'd have loved to give you the site access, but i'm on local server and am trashing out the full concept before taking it online for testing and ironing out.
·
Tuesday, 23 September 2014 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

I guess the problem is actually because of the combination of EasyDiscuss parsing these "tags" in the bbcode and somehow when sourcerer kicks in, it actually modifies the code to something else and somehow breaks the page.

I am not really sure why but if you can provide me with the link to the discussion that's broken and provide the back end and FTP access, I will take a look at this for you.
·
Tuesday, 23 September 2014 18:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Thank for your update. As i'm currently working on local host, i dont have a live link. But as soon as i move online i'll give you access to the backend and FTP.

regards
Sunny
·
Wednesday, 24 September 2014 13:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure, do let us know when it's available publicly
·
Thursday, 25 September 2014 01:55
·
0 Likes
·
0 Votes
·
0 Comments
·
NIK FARIS wrote:

Hello Sunny,

For your first requirement, please replace the attached file in: ../components/com_easydiscuss/themes/simplistic/post.question.item.php.


Hi Nik,
Your hack is working fine, but i've realised that for one of the category i want users to post questions, and if i use the hack all users have their profile and link part pruned.

Is there anyway we can hide right column sidebar (Which contains profile link & PM) only for posts by super users (e.g user ID 492)? and let it remain for posts by other members?

I'm a non technical person, but by logic i was thinking on adding (Taken from one of the other solved thread on stackideas):
<?php if( $user->id != 492){?> But i dont know on how to complete the code.

regards
Sunny
·
Monday, 13 October 2014 20:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

Yes, it is possible. Please replace the attached file in: ../components/com_easydiscuss/themes/simplistic/post.question.item.php . Hope this helps.
·
Tuesday, 14 October 2014 00:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik,

Many thanks you are a hero!!

Also can you please advise what changes to be done in frontpage.post.php & search.item.php to achieve the same ( So that on the front page & on search results page all posts started by admin have no left side bar)

have a nice day.

regards
Sunny
·
Tuesday, 14 October 2014 13:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

Please replace the attached file in: ../components/com_easydiscuss/themes/simplistic/frontpage.post.php . The checking I added in line 33. Hope this helps.
·
Tuesday, 14 October 2014 13:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik, Thanks.

That works for frontpage.post.php,
but if i add <?php if ($post->user_id != '492') { ?> in search.item.php just before line 52, it throws a blank page, am i missing anything?

warm regards
Sunny
·
Tuesday, 14 October 2014 14:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

I think you missed the close bracket for if statement. Try this file instead.
·
Tuesday, 14 October 2014 14:33
·
0 Likes
·
0 Votes
·
0 Comments
·
that was perfect.
Even i inserted the same line and i was getting different results, nevermind.... all is well that ends well!!
thanks for your time and efforts.
·
Tuesday, 14 October 2014 14:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

You're welcome.
·
Tuesday, 14 October 2014 16:06
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post