Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 My Feature Ideas
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #41
RE: My Feature Ideas
Thanks, Yumi Smile

01-17-2012 01:20 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #42
RE: My Feature Ideas
I have a suggestion - it may already exist, but it would be handy if the thread grouping on forumdisplay_threadlist could be defined as a variable or something that gives us control at template level rather than in forum options.

An example of where I might want to use this is if I have a layout that I want to be able to scale up/down depending on the users browser.

If I am viewing on a monitor at home from my PC then having three columns in a layout makes sense; however, if I am viewing from my phone, then a single column might be better.

I hope this was a clear suggestion.


[Image: leelink.gif]
MYBB1.6 & XThreads
04-27-2012 05:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #43
RE: My Feature Ideas
One column would be easy to do - just hardcode all the wrappers in the thread template and blank out the separator template.

Otherwise, for a more general case, this plugin should do it:

PHP Code:
1
2
3
4
5
6
7
8
9
function something_info() {
  return array(/*stick random info here*/);
}
$plugins->add_hook('forumdisplay_start', 'something_run');
function something_run() {
  global $foruminfo;
  if($foruminfo['fid'] != 2) return;
  $foruminfo['xthreads_grouping'] = (MOBILE ? 1:3);
}


My Blog
04-27-2012 10:10 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #44
RE: My Feature Ideas
Thank you Zinga. I see what the code is doing, I understand how to make it into a "plugin" for mybb, but I am not totally clear how to implement it.

I see you have the MOBILE ? 1:3 in there, but that is about it. However, I wonder if it would be possible to use that as a basis for a conditional, in the template?


[Image: leelink.gif]
MYBB1.6 & XThreads
04-28-2012 01:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #45
RE: My Feature Ideas
I guess you could try something like this:

Code:
<setvar threadcount>$tplvars['threadcount'] + 1</setvar>
<if $tplvars['threadcount'] % 3 == 0 then>
<!-- will show every 3 threads -->
</if>


My Blog
04-28-2012 09:32 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #46
RE: My Feature Ideas
For images, it would be cool if you could set a fixed-size for a thumbnail and the plugin would crop a section of the image out automatically, e.g. so you could have a row of thumbnails all the same size (see: http://dribbble.com/)
07-10-2012 12:58 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #47
RE: My Feature Ideas
Interesting.  So scale down, then crop?  I wonder also how to represent that in the setting...

My Blog
07-10-2012 08:29 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #48
RE: My Feature Ideas
maybe for a fixed size thumbnail you could use *, so like

800x600|90*90|

etc. I don't know if this would work.
07-10-2012 11:11 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #49
RE: My Feature Ideas
I've thought about it - maybe I'll do a filter-chain type implementation:

Code:
800x600|320x240|mythumb=scale_min(90,90),crop_cm(90,90)


Where scale_min = scale image so that it is at least the size specified (90x90), crop_cm = crop from center-middle to 90x90.


My Blog
07-10-2012 11:36 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #50
RE: My Feature Ideas
that would be perfect! i thought of asking for a specification of where to crop from but thought it might be too much
07-11-2012 05:07 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: