Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Very new at PHP
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #51
RE: Very new at PHP
I'd guess it to be {$folder}

My Blog
06-16-2012 12:00 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #52
RE: Very new at PHP
That did it! Thanks.

Not sure how I lived before template conditionals ...
06-16-2012 02:00 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #53
RE: Very new at PHP
How to check current action in usercp, e.g. action=subscriptions? And to also check if it is usercp.php with NO action.
(This post was last modified: 06-21-2012 02:37 AM by brad-t.)
06-21-2012 02:36 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #54
RE: Very new at PHP

Code:
<if $mybb->input['action'] == 'subscription' then>

Code:
<if $mybb->input['action'] == '' then>


If you're dealing a lot with conditionals, it may help to have some basic knowledge in PHP by the way.


My Blog
06-21-2012 09:20 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #55
RE: Very new at PHP
Great, thank you Zinga!

Yes, I'd really like to learn some PHP ... right now I am working full time and have to finish this project by July 1, so it's really a crunch for me. I didn't expect to use Template Conditionals so much, but it's very useful. Once the new version is out I can take some time to start learning PHP.

I'm sure my questions are becoming exasperating, which is why I went looking for a donation option at least haha
(This post was last modified: 06-21-2012 11:15 AM by brad-t.)
06-21-2012 10:25 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #56
RE: Very new at PHP
Is there a way to check the character count of a message, or to check if there is any message at all, basically? I want to hide the div that contains the message if there was no message written.
07-16-2012 03:06 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #57
RE: Very new at PHP
No sure if this will work:

PHP Code:
<if my_strlen($post['message']) > 0 then>
<div>{$post['message']}</div>
</if>


Or maybe:

PHP Code:
<if $post['message'] then>
<div>{$post['message']}</div>
</if>


Or maybe setting up a variable with template conditionals, something I have never done.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
07-16-2012 04:17 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: #58
RE: Very new at PHP
second one works, thanks! i assumed it wouldn't work but after reading you also suggest it i decided to try it haha
07-17-2012 01:37 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: