MyBB Hacks

Full Version: Upgrade for 1.8?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(10-07-2014 05:00 PM)ZiNgA BuRgA Wrote: [ -> ]^ What he said, or if you need it in templates:

HTML Code
<if !$GLOBALS['threadfields']['portalimg']['url'] then>
<a href="{$GLOBALS['threadfields']['link']}" target="_blank"><img src="http://img.bitpixels.com/getthumbnail?code=71632&size=200&url={$GLOBALS['threadfields']['link']}" /></a>
<else>
<img src="{$GLOBALS['threadfields']['portalimg']['url']}/thumb400x400" width="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['w']}" height="{$GLOBALS['threadfields']['portalimg']['thumbs']['400x400']['h']}" alt="{$thread['subject']}" />
</if>


Thank you very much!! Works perfectly Biggrin
Hi, this code is right? because sometime doesn't work (I have mybb 1.8):


PHP Code:
<if ($GLOBALS['mybb']->user['usergroup']) == 1 && ($GLOBALS['threadfields']['hide']) == HIDE then>
Hide content if thread field is on "hide", only for guests (group "1")

<elseif ($GLOBALS['mybb']->user['usergroup']) == 2 && ($GLOBALS['threadfields']['hide']) == HIDE then> 
Hide content if thread field is on "hide" for member in group "2", but with other description different for group "1"

<else>
Show normal content for all other members

</if>


Sometime doesn't work, I see thread also if I'm a guest for example but I'm sure that threadfield is on "hide". I use it on forumdisplay_thread.


Here thread field configuration for "hide" in ACP:

EDIT THREAD FIELDS

Title: Hide
Key: hide
Applicable Forums: only some forum
Hide Thread field on new/edit thread and show thread: uncheck all
Input Field Type: Listbox
Display order: 10


INPUT OPTIONS

Editable by Administrators

Value List

Quote:HIDE
SHOW

Allow multiple values for this field: no

Input Formatter: {VALUE}

Custom Modify Error: blank (nothing written)
Settable Value Permissions: blank (nothing written)


INPUT FIELD OPTIONS

Description: Hide or show

Default Value: HIDE
(this because when a user create a thread, I would like always it hidden for group 1 and 2, then I'll decide if show or not)

Field Input Width: 40
Field Input Height: 1

Capture Tab Key: yes
Use Custom Input HTML: no


OUTPUT OPTIONS

Blank Replacement Value: HIDE
Display Format: {VALUE}
Formatting Map List: blank (nothing written)
Viewable by Usergroups: administrators
Unviewable Value: blank (nothing written)

MISC OPTIONS
Filtering Mode: disabled
Underlying Data Type: text



Then another odd thing: from list of threadfields, in ACP, if I click on this threadfield "Hide", I go directly to the bottom of the page on "Misc Options". But with all others threadfields I haven't this. Like if there an error in Misc Options maybe.

With other threadfields I start from the top, from Title etc.

Do you know where could be the problem? and how fix it?

Thank you in advance and sorru for my English
Hi, the problem seems to be this -> Viewable by Usergroups: administrators

I unchecked everything in Viewable by Usergroups and works. And when I click from list in ACP I go to the top of threadfield and not in bottom of page.

Then in forumdisplay_thread I have used this code:

PHP Code:
<if $mybb->user['usergroup'] == 1 && ($GLOBALS['threadfields']['hide']) == 'hide' then>

 Please login or register to show this thread.
  
  <else>

You're a member and you can see all threads you want.

</if>


In ACP settings for threadfield:

Checked Hide input field on New/edit thread and Hide on Show thread

Editable by / Required Field? Administrators

Values List:

Quote:hide
show

In Input Field Options nothing, only 40 for Field Input Width, 1 for Field Input Height, Yes for Capture Tab Key and No for Use Custom Input HTML.

Instead in Output Options:
Blank Replacement Value: hide

Display Format: {VALUE}

Viewable by Usergroups: nothing checked

Anyway also if there isn't usergroup for Viewable by Usergroups, if I'm a member I don't see thread field, only if I'm admin I can see and edit it (because I have put "Editable by / Required Field? Administrators" I think).

So:
I (admin) create a new thread, I don't set show/hide, it's on (not set) -> if you're guest you don't see thread; if you're member you see thread

A user creates a new thread, he/she doesn't choose show/hide (and it's ok) -> if you're guest you don't see thread; if you're member you see thread.

I (admin) change "hide" thread field from (not set) to show -> now also guests can see thread. If I re-choose "hide", guests again don't see thread.

In the end, now it seems works Biggrin
Yeah, the viewable setting refers to the viewability of the thread field - it doesn't make sense to set it if you're trying to hide a thread.

(10-18-2014 02:05 AM)nier3 Wrote: [ -> ]Then another odd thing: from list of threadfields, in ACP, if I click on this threadfield "Hide", I go directly to the bottom of the page on "Misc Options". But with all others threadfields I haven't this. Like if there an error in Misc Options maybe.
I don't know about this one though.  Maybe it's your browser automatically jumping there?
That last one sounds familiar:
http://community.mybb.com/thread-161584.html
(10-23-2014 03:02 AM)Sama34 Wrote: [ -> ]That last one sounds familiar:
http://community.mybb.com/thread-161584.html
I see, thanks for the note.

By the way, sorry for not getting back to you about the Pages plugin.  It's been on my to do list for a while, but I haven't found the time yet Frown
Worry not, dear friend! (being dramatic)

Tongue
xthreads is working fantastic with 1.8 no bugs found till now
Pages: 1 2 3
Reference URL's