Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Using XThreads Custom Thread Fields For Plugin Settings
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #21
RE: Using XThreads Custom Thread Fields For Plugin Settings
(06-08-2011 04:11 PM)av8r_bra Wrote:  Sorry for the newbie question, but can it be added anywhere in portal.php, or in the place where you want the threads to show up?
If you use a default MyBB portal, you can put it anywhere in your portal template.
Wherever you put the variable in your portal template, in there the "Featured Threads" will be displayed. You can customize the additional templates added by the plugin (in your global template).

(06-08-2011 04:11 PM)av8r_bra Wrote:  Has anyone tried using this example with ProPortal's portal.php file?
If you want the "Featured Threads" to be displayed in your Pro Portal page, probably you need to change the hook of the plugin.

06-09-2011 02:25 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #22
RE: Using XThreads Custom Thread Fields For Plugin Settings
I think that if you want to use this in pro_portal then it would be a custom block. I have made a couple of blocks for pro_portal, so I will see if I can edit this one to work with pro_portal - if that is ok with RateU?


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 06-09-2011 07:08 AM by leefish.)
06-09-2011 07:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
av8r_bra Offline
Junior Member
**
Posts: 11
Joined: Jun 2011
Post: #23
RE: Using XThreads Custom Thread Fields For Plugin Settings
If that's ok with RateU that would be awesome!

I need a simple News block for my portal, where I could use a forum to create topics to show up in the portal.

Leefish, what are you using for your portal on http://www.leefish.nl/mybb/portal.php ? Is that Proportal modified?

That's what I need, but frontpages only for 1 forum section.. =)
(This post was last modified: 06-09-2011 05:11 PM by av8r_bra.)
06-09-2011 05:11 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #24
RE: Using XThreads Custom Thread Fields For Plugin Settings
Of course everyone is free to modify it.

06-10-2011 02:56 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #25
RE: Using XThreads Custom Thread Fields For Plugin Settings
Thank you RateU - I will have a go at it.

@av8r_bra - I use the mybb portal on leefish with some modifications I got from here on mybb hacks and just around the web. I used a portal announcement to pull the info into the announcements block.

My understanding is that you want a pro_portal block with featured threads showing in it - as made by this plugin from RateU - is that correct?


[Image: leelink.gif]
MYBB1.6 & XThreads
06-11-2011 12:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
av8r_bra Offline
Junior Member
**
Posts: 11
Joined: Jun 2011
Post: #26
RE: Using XThreads Custom Thread Fields For Plugin Settings
Yes, if I understood right what it does.. Smile

My testing website is http://www.voando.org/forum/portal.php (sorry, it's in portuguese)

Right now I've got Proportal set up, and I have a forum section for posting news. What I'm trying to do is a main block for showing the news in portal(maybe with some of the content/image), followed by last threads in forum.

The main reason for that is that I'm trying to create a good website based only on MyBB, no wordpress or such bridged..
06-11-2011 10:37 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #27
RE: Using XThreads Custom Thread Fields For Plugin Settings
Well, if you want a cool looking board with things that look a bit different to the usual forum layout then XThreads is JUST what you are looking for.

I have to do some small stuff on leefish and then I will have a go.


[Image: leelink.gif]
MYBB1.6 & XThreads
06-12-2011 12:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #28
RE: Using XThreads Custom Thread Fields For Plugin Settings
Here is a pro_portal block for the display in portal as posted by RateU. Its just RateU's code wrapped in a block - you will need ZingaBurga's thread tooltip preview plugin to get the post preview.

The limit for threads is hardcoded to 5. If you want to change the template then you have to change it in the block as that is how pro_portal does it.

In the block it is this bit:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$xtportaldisplay.="<tr>
	<td class='{$altbg}'>
		<div>
			{$xtdispportal_thread_icon}
			<strong><a href='{$xtdispportal_thread_link}'>{$xtdispportal_thread_subject}</a></strong>
			By: {$xtdispportal_profile_link}{$xtdispportal_user_avatar}
		</div>
		<br class='clear' />
		<div class='post_body'>
			{$xtdispportal_postpreview}
		</div>
		<div class='smalltext'>
			<em>Posted In: <a href='{$xtdispportal_forum_link}'>{$xtdispportal_forum_name}</a>,
			{$xtdispportal_date} at {$xtdispportal_time}<br />
			Replies: {$xtdispportal_replies}, Views: {$xtdispportal_views}</em>
		</div>
	</td>
</tr>";


If you want to change the number of threads then you need to open the block in your editor and find

Code:
1
2
3
4
5
6
7
8
9
10
11
$result = mysql_query
("
		SELECT t.*, t.username AS tusername, u.username, u.avatar, u.usergroup, u.displaygroup, f.name
			FROM ".TABLE_PREFIX."threads t
			LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
			LEFT JOIN ".TABLE_PREFIX."threadfields_data td ON (td.tid=t.tid)
			LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)
			WHERE t.visible=1 AND td.xtdispportal='Yes' AND t.closed NOT LIKE 'moved|%''.$xtdispportal_unviewwhere.'
		    	ORDER BY t.dateline desc
			LIMIT 5
;")


and just change the number of the limit.

I have it running over on my testboard if you want to have a look:

http://www.leefish.nl/testfish/portal.php

Attachment removed - see later post.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 06-19-2011 10:56 PM by leefish.)
06-12-2011 09:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
av8r_bra Offline
Junior Member
**
Posts: 11
Joined: Jun 2011
Post: #29
RE: Using XThreads Custom Thread Fields For Plugin Settings
Heyy leefish, thanks for sharing bro...it looks really nice on your test forum!

When trying to run the block here, I get a message: No database selected when reloading the portal page...do I have to change any path in the block? Also, could it show posts from only one forumid, like News?

I wish I could code 1/4 of what you guys can do...lol
06-18-2011 11:39 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #30
RE: Using XThreads Custom Thread Fields For Plugin Settings
(06-18-2011 11:39 PM)av8r_bra Wrote:  Heyy leefish, thanks for sharing bro...it looks really nice on your test forum!

When trying to run the block here, I get a message: No database selected when reloading the portal page...do I have to change any path in the block? Also, could it show posts from only one forumid, like News?

I wish I could code 1/4 of what you guys can do...lol


Hmm, I don't know what the issue could be re the error message - please check:

1) That you have set up the custom thread field as in the first post from RateU.
2) If you have done that, and you ONLY use the custom thread field in a certain forum then it will only show threads from that forum specified in the custom thread field (assuming they are marked as yes)
3) Ensure in your pro_portal that you have the block set to viewable for your usergroup(s).


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 06-19-2011 04:15 AM by leefish.)
06-19-2011 03:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: