Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Very new at PHP
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #41
RE: Very new at PHP
Well Whooo! It worked. Thank you very much. I was trying to figure out the stripos function as I think it will come in very handy. Thank you.

For those who may be interested, this was the final code snippet:

PHP Code:
<if (stripos(','.$memprofile['additionalgroups'].',', ',15,') !== false) then>
Show Stuff on profile where profile owner is in ADDITIONAL usergroup 15
</if>



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 03-28-2012 08:21 AM by leefish.)
03-28-2012 08:00 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: #42
RE: Very new at PHP
Sorry for messing that up.  stripos is just a case insensitive version of strpos, so either will work fine.

My Blog
03-28-2012 08:59 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #43
RE: Very new at PHP
Well, it was very interesting so no big deal. My next quest is to make certain profile fields only available for certain user groups... I don't think that is gonna be an easy one though.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 03-28-2012 10:17 AM by leefish.)
03-28-2012 09:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #44
RE: Very new at PHP
Another basic variable question:

if user's post count in specified forum is 0
05-16-2012 08:07 AM
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: Very new at PHP
I presume you mean number of posts made by a user in a specific forum only?
If so, there's no nice way to get that kind of information.

My Blog
05-16-2012 12:12 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #46
RE: Very new at PHP
Yeah, I basically wanted to show a message if user "x" has zero posts in forum "y"

Too bad
05-17-2012 12:54 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #47
RE: Very new at PHP
How to show x if there are 0 replies to a thread?
06-09-2012 12:46 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #48
RE: Very new at PHP
If it is in showthread or forumdisplay_thread, you can use $thread['replies']

06-09-2012 05:56 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #49
RE: Very new at PHP
Thanks Smile
06-13-2012 08:23 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #50
RE: Very new at PHP
How about the current folder ID in messaging?

Sorry to ask so many questions ;;;
06-15-2012 11:29 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: