Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Upgrade for 1.8?
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #21
RE: Upgrade for 1.8?
(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
10-07-2014 08:12 PM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #22
RE: Upgrade for 1.8?
Hi, this code is right? because sometime doesn't work (I have mybb 1.8):


PHP Code:
1
2
3
4
5
6
7
8
9
10
<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
10-18-2014 02:05 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #23
RE: Upgrade for 1.8?
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:
1
2
3
4
5
6
7
8
9
<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
(This post was last modified: 10-20-2014 10:35 AM by nier3.)
10-20-2014 10:33 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #24
RE: Upgrade for 1.8?
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?

My Blog
10-21-2014 05:27 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #25
RE: Upgrade for 1.8?
That last one sounds familiar:
http://community.mybb.com/thread-161584.html

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
10-23-2014 03:02 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #26
RE: Upgrade for 1.8?
(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

My Blog
10-24-2014 04:05 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #27
RE: Upgrade for 1.8?
Worry not, dear friend! (being dramatic)

Tongue

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 10-31-2014 02:26 AM by Sama34.)
10-31-2014 02:26 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Hamster24 Offline
Member
***
Posts: 69
Joined: Sep 2014
Post: #28
RE: Upgrade for 1.8?
xthreads is working fantastic with 1.8 no bugs found till now
01-10-2015 10:17 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: