Search Results for '+.+default+.+'
-
Search Results
-
Topic: Syntax questions
A couple of questions about what syntax to use, especially on template pages:
1. I see that a lot of people use
_e('string...')
instead ofecho('string...')
. Is this just a bbpress/wordpress thing or is this generally acceptable php coding?2. In front-page.php of kakumei (and many other places), I see people using this shorthand echo where normal text would work just fine. For instance, in the hottags div, it is:
<h2><?php _e('Hot Tags'): ?></h2>
Why would you have PHP echo that when you could just have it as plain ol’ text in the first place? Am I missing something?
I realize neither of these is of any earth-shaking importance, but I would like to know so I can keep my code modifications in line with the default syntax that is used throughout. Thanks!
Topic: localhost installs
I recently did my first bbpress install on localhost and it went miserably. I used the latest download from today.
Checking on this forum I had the same path seperator issues and stylesheet issues others had, etc.
My $bb->domain and $bb->path were fine. The fresh install just didn’t work properly under xampp and then again a retry on easyPHP.
This is the solution and findings I found:
1. The first issue is because in config.php and bb-load.php dirname(__FILE__) is used to get the base path for BBPATH. This is not a good thing on localhost Windows based installs.
2. There are a number of attempted workarounds to this that I’ve read about in this forum. All of them that I saw didn’t work. Focusing on the issue with the stylesheet href not being correct I noticed that there was logic in the bb_get_active_theme_folder() function.
By default, the installer does NOT create an option entry ‘bb_active_theme’ in the database table topicmeta. The code logic doesn’t make the correct uri.
To fix this, do an install and then add a database field bb_active_theme in the topicmeta table.
For example, I set mine to:
Playing regular expression games to change x: and in general is not worth it. This seemed to be simple and worked right out of the box.