Search Results for 'test'
-
AuthorSearch Results
-
November 2, 2007 at 12:27 pm #60556
In reply to: sub-sub forums
warmechoco
MemberHi! thanks alot for the help,
only 1 problem.. my pages don’t have that kind of structure..
forum.php
<?php bb_get_header(); ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php forum_name(); ?></h3>
<?php if ( $topics || $stickies ) : ?>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<a href="<?php forum_rss_link(); ?>"><?php _e('RSS feed for this forum'); ?></a>
<div class="nav">
<?php forum_pages(); ?>
</div>
<?php endif; ?>
<?php post_form(); ?>
<?php bb_get_footer(); ?>front-page.php
<?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?><?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?><?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?>November 1, 2007 at 8:10 am #61252In reply to: Sticky on “Latest Discussions”
livibetter
MemberThere are two
if
blocks infront-page.php
, one for$super_stickies
, another for$topics
. Remove first one(about 8 lines) and replace second with<?php
$stickyIdx = 0; $topicIdx = 0;
while ($stickyIdx < count($super_stickies) && $topicIdx < count($topics)) {
if ($super_stickies[$stickyIdx]->topic_time > $topics[$topicIdx]->topic_time)
array_splice($topics, $topicIdx, 0, array($super_stickies[$stickyIdx++]));
$topicIdx++;
}
if ($stickyIdx < count($super_stickies))
array_splice($topics, count($topics), 0, array_slice($super_stickies, $stickyIdx));
if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; // $topics ?>Actually, the replacement is equivalent to inserting 8 lines of code.
November 1, 2007 at 6:20 am #2543Topic: Sticky on “Latest Discussions”
in forum Troubleshootingrolanddeschain
MemberI’d like my sticky threads to act exactly like regular threads on the front page “Latest Discussions” section, instead of always being at the top of the list. That is, they’d still appear on the list, but in the order of last posting – the same as all the usual threads.
Is there any easy fix?
November 1, 2007 at 4:23 am #61291In reply to: “Access denied for user” during install?
ericakadisco
MemberThanks for the response.
Okay, I tried to patch all the files with the changes in that ticket and I seem to get the same error.
Here is my config.php:
<?php
// ** MySQL settings ** //
define('BBDB_NAME', 'approachanxiety_com_bbpress'); // The name of the database
define('BBDB_USER', 'disco'); // Your MySQL username
define('BBDB_PASSWORD', 'xxxx'); // ...and password
define('BBDB_HOST', 'localhost'); // 99% chance you won't need to change these last few
define('BBDB_CHARSET', 'utf8'); // If you are *upgrading*, and your old config.php does
define('BBDB_COLLATE', ''); // not have these two contstants in them, DO NOT define them
// If you are installing for the first time, leave them here
// Change the prefix if you want to have multiple forums in a single database.
$bb_table_prefix = 'bb_'; // Only letters, numbers and underscores please!
// The full URL of your bbPress install
$bb->uri = 'http://approachanxiety.com/bbpress/';
// What are you going to call me?
$bb->name = 'New bbPress Site';
// This must be set before you run the install script.
$bb->admin_email = 'ericmonse@yahoo.com';
// Set to true if you want pretty permalinks, set to 'slugs' if you want to use slug based pretty permalinks.
$bb->mod_rewrite = false;
// The number of topics that show on each page.
$bb->page_topics = 30;
// A user can edit a post for this many minutes after submitting.
$bb->edit_lock = 60;
// Your timezone offset. Example: -7 for Pacific Daylight Time.
$bb->gmt_offset = 0;
// Change this to localize bbPress. A corresponding MO file for the
// chosen language must be installed to bb-includes/languages.
// For example, install de.mo to bb-includes/languages and set BBLANG to 'de'
// to enable German language support.
define('BBLANG', '');
// Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
// of Akismet's powerful spam blocking, you'll need one. You can get an Akismet key at
// http://wordpress.com/api-keys/
$bb->akismet_key = ''; // Example: '0123456789ab'
// The rest is only useful if you are integrating bbPress with WordPress.
// If you're not, just leave it as it is.
$bb->wp_table_prefix = ''; // WordPress table prefix. Example: 'wp_';
$bb->wp_home = ''; // WordPress - Options->General: Blog address (URL) // Example: 'http://example.com'
$bb->wp_siteurl = ''; // WordPress - Options->General: WordPress address (URL) // Example: 'http://example.com'
/* Stop editing */
if ( !defined('BBPATH') )
define('BBPATH', dirname(__FILE__) . '/' );
require_once( BBPATH . 'bb-settings.php' );
?>When I run the testdb.php I get
Connection Results
Connection: Successful!
Database Selection: Successful!
Enter Your MySQL Information
MySQL Hostname localhost
MySQL Username disco
MySQL Password xxxx
MySQL Database approachanxiety_com_bbpress
Here is the text php file that connects to the database and works:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>MySQL Test Script</title>
<style>
body { font-family: Verdana; font-size: 10pt; }
td { font-size: 10pt; }
th { font-size: 8pt; }
</style>
</head>
<body>
<?php
if ( isset ( $_POST['submit'] ) ) {
?>
<table border="1" summary="" cellpadding="2" cellspacing="0" style="border-collapse: collapse;">
<tr>
<th bgcolor="#F2F2F2" colspan="2"><center><b>Connection Results</b></center></td>
</tr>
<?
if (!$link = @mysql_connect($_POST['mysql_hostname'], $_POST['mysql_username'], $_POST['mysql_password'])) {
?>
<tr>
<td>Connection:</td>
<td bgcolor="red"><font color="white"><?php echo mysql_error(); ?></font></td>
</tr>
<?
} else {
?>
<tr>
<td>Connection:</td>
<td bgcolor="green"><font color="white">Successful!</font></td>
</tr>
<?
}
if (!$dblink = @mysql_select_db($_POST['mysql_database'], $link)) {
?>
<tr>
<td>Database Selection:</td>
<td bgcolor="red"><font color="white"><?php echo mysql_error(); ?></font></td>
</tr>
<?
} else {
?>
<tr>
<td>Database Selection:</td>
<td bgcolor="green"><font color="white">Successful!</font></td>
</tr>
<?
}
@mysql_close($link);
?>
</table>
<?
}
?>
<form method="post">
<table border="1" summary="" cellpadding="2" cellspacing="0" style="border-collapse: collapse;">
<tr>
<th bgcolor="#F2F2F2" colspan="2"><center><b>Enter Your MySQL Information</b></center></td>
</tr>
<tr>
<td>MySQL Hostname</td>
<td><input type="text" name="mysql_hostname" size="40" value="<?php echo $_POST['mysql_hostname']; ?>"></td>
</tr>
<tr>
<td>MySQL Username</td>
<td><input type="text" name="mysql_username" size="40" value="<?php echo $_POST['mysql_username']; ?>"></td>
</tr>
<tr>
<td>MySQL Password</td>
<td><input type="text" name="mysql_password" size="40" value="<?php echo $_POST['mysql_password']; ?>"></td>
</tr>
<tr>
<td>MySQL Database</td>
<td><input type="text" name="mysql_database" size="40" value="<?php echo $_POST['mysql_database']; ?>"></td>
</tr>
<tr>
<td colspan="2"><center><input type="submit" name="submit" value="Submit"> <input type="reset" name="reset" value="Reset"></center></td>
</tr>
</table>
</form>
</body>
</html>October 31, 2007 at 10:56 pm #61290In reply to: “Access denied for user” during install?
chrishajer
ParticipantI think if you post the config.php and the test script with connection details, someone will be able to help. Seems like a simple connection issue, assuming you followed the instructions in the other post you found.
Rather than replacing db-mysqli.php with db.php, did you try to apply the patch attached to this ticket?
October 31, 2007 at 9:27 pm #2558Topic: Add New and Finding Those Extra Divs
in forum Troubleshootingmatt123
MemberI’ve been searching, every file in my kakumei theme and cannot find the file that is messing up how the add new page is displaying. I know its a div issue but can’t seem to find that extra div.
What file displays the add new option in the latest discussion section?
Does it display within another file? Which one?
October 31, 2007 at 9:11 pm #61289In reply to: “Access denied for user” during install?
ericakadisco
MemberAlso, using a test script, I entered the same database information that’s in my bbpress config.php file and I can successfully connect to my database. The user, Disco, is the default user and is database administrator so there’s no reason why I should get access denied.
October 31, 2007 at 12:43 pm #61249In reply to: on plugin activation, create table in db
Null
MemberEuuh ok, still not sure how to use this.
Let’s say I want to ad a tabel in the db called ‘test’, but only if it doesn’t excist.
So on plugin activation:
1- check if the table ‘test’ excists
2- if not, insert the tabel ‘test’
3- else die
October 31, 2007 at 10:57 am #61245In reply to: Adding tekst in a new custom page, hyperlinks broken
livibetter
MemberCould you paste your
test.php
?October 31, 2007 at 4:14 am #61284In reply to: Rationale behind profile page content?
lookfab
MemberThanks livibetter. I just realized that the profile field doesn’t show any fields that are not populated, so in my case there was no information to show until I added the website a few minutes ago.
Not my brightest moment
October 28, 2007 at 2:41 pm #2550Topic: Plugin: YouTube in bbPress
in forum Installationz241228
MemberPlugin: YouTube in bbPress
test!
October 26, 2007 at 2:32 pm #61253In reply to: Problem inserting affiliate banners
kannued
ParticipantIf you have the latest version of bbpress (.8.3), you need to activate the plugin that allows images.
October 25, 2007 at 11:59 am #2541Topic: Adding tekst in a new custom page, hyperlinks broken
in forum TroubleshootingNull
MemberHi,
I’m trying to add a new custom page to my forum. It’s very simple, this is what I have so far:
– 1 custom page called test.php
– the page includes the forum header and footer
– The content (middle) part is pulled from the db aswell
All works fine except hyperlinks! Links like http://www.test.com will NOT appear as a hyperlink, but just as plain text. How to fix this? I want this to behave just like this textfield I am typing in right now (auto hyperlink converting).
bbcodes like bold do work.
_Null
October 24, 2007 at 8:41 pm #61239In reply to: Show funny characters in usernames
livibetter
MemberI only tested one case, the dollar sign ‘$’ on my testing forum with commenting out the entire
function bb_user_sanitize
except last line. I can register with ‘$’ in username, post with that account and the username is showed correctly.October 21, 2007 at 8:58 pm #53604In reply to: Add a “page” to my template
livibetter
MemberHi,
Here is a quick php for it(Use this method at your own risk), you need pretty permalink to use it.
Save the following code in bbPress root folder as
page.php
<?php
require_once('./bb-load.php');
if (preg_match('/.*/page/(.*)/', $_SERVER['REQUEST_URI'], $matches)) {
$file = bb_slug_sanitize($matches[1]) . '.php';
if (file_exists(bb_get_active_theme_folder() . "/static/$file")) {
bb_load_template("static/" . $file);
exit(0);
}
}
wp_redirect(bb_get_option('uri'));
?>Put your static pages in a new
static
folder under your template folder, they should looks like<?php bb_get_header(); ?>
The static content here.
<?php bb_get_footer(); ?>Then you can access a static file. For example, access
test.php
(bb-templates/yourtemplate/static/test.php) at http://yoursite.com/bbpress/page/testRemember: Use this method at your own risk
October 21, 2007 at 4:44 pm #2525Topic: Blank screen after installing bbPress
in forum Installationmajea
MemberI am trying to integrate bbPress with WordPress. I installed it on my local test environment first, in order to work out any kinks. bbPress is in the same database as WordPress. The installation went fine, it seemed, and I ended up with a basic version of bbPress — left-aligned black font on a plain white background. Is this what I am supposed to see?
However, when I tried to point it to WordPress, using “require_once(‘http://localhost:8888/wordpress/wp-blog-header.php’);” in the config.php file, I only got a blank screen. Any idea what I’m doing wrong?
I sort of fumble my way through all this web design stuff, so there is a good chance the answer is painfully easy, but I can’t seem to find it. Thanks.
vitovarducci
MemberAwesome. OK, so I removed the entry from the database and I was able to login like normal.
Then I went back and created a new post again to test if it would create a new topic in bbpress. No new topic. And it wouldn’t let me login to the backend again.
So I went back and removed the
capabilites
entry from the database.I can create topics no problem in bbpress. Just doesn’t create new topics when I write posts.
October 20, 2007 at 5:57 pm #51648In reply to: Bozo – what are the triggers?
fel64
MemberGostallion, got the latest bb?
vitovarducci
MemberI’m using the latest version of bbsync.
Now I can’t login to the bbpress backend. It’s like it doesn’t recognize the roles anymore. I can login and view my profile and such, but can’t get into the backend.
October 20, 2007 at 4:08 am #61182In reply to: Error while posting
wrsantiago
MemberI am using 0.8.3 I upgraded the same day it came out and everything works great, I am very happy with everything, but this is so weird. Like you said their is something bad about this post.
I am running the forum in bluehost.com as far as I know they are pretty good at keeping up to date with their upgrades so I am sure they have all their software up to date.
I was installing PM to the forum when I notice the error so I deleted all the changes and deactivate the plugin to check if that was the problem but it turn out that even without the plugin the error keep coming up.
Maybe I just found a bug on the latest version but I don’t know anything about coding so this is up to you guys.
fel64
MemberSlex, indeed there’s some issue there. It probably needs further thinking about. However, like I said if you want to modify it to stop wp saving comments, or even to make bb add replies to wp comments, implement the change and I would definitely like to make a branch of bbsync.
Vito, can you please open bb’s config.php file and add this line to it somewhere?
global $bb_cache;
That should fix that error (assuming you’re using the latest stable, .8.3!).
No good news on making backdated topics I’m afraid, because there’s no way to use the API to create the topic and set the time of it to be in the past. You’d have to copy and modify some large blocks of code, which is exactly what I want to avoid with bbsync (regarding the problem that became with bbpress post, for example).
However, if you edit an old post in wp and press save, it will create a new topic in bb for you (but with today’s date, rather than the appropriate one). It’s an unfortunate limitation of bbsync.
October 19, 2007 at 1:30 am #60750In reply to: Shares Roles with WordPress [Role Manager]
Lars-Christian
MemberI’ve looked through the (two) plugins that allows us to restrict forums, and sadly, it seems your guesses are correct. The first one which allows you to allow users in to a forum based on member names is hardly compatible with the latest version of bbPress (and seems dead). I almost got it working right, except for the fact that it messed up my forum hierarchy, and some other bugs, which meant that threads couldn’t be posted to a certain forum without being in that forum, which was enough for me to rule it out.
The other option, private forum as you tried out yourself, doesn’t allow us to do anything but restrict it to either members, mods or admins, which is the most viable solution to me at this point. It does mean however that I will need to give all my members who need access to the restricted forum moderator capabilities. Hardly ideal, but I’ll have to go with it for now.
I’ll be looking at it this weekend though, and hopefully I can find a sort of solution to it. Right now I’m thinking of finding a way to strip moderators of actual moderating powers, but I really don’t know. Adding another usergroup (pretty simple) should work too, but it has to be reflected in the plugin as well, but I don’t have the coding skills (I don’t have any coding skills) to do that.
Hopefully a gifted plugin developer will step in and solve this for us
slexaxton
MemberTested. Works. Good job Jaz… now I dont have to wonder how many months from now my hack would have caused a nuclear war in china.
And just for the sake of completeness. I did not test the case where a user is a blog writer (can write new posts), but is not some sort of administrator on the forum. I can’t foresee needing this functionality, but if it doesnt work, dont get mad at me.
Database redundancy time?
jazbek
MemberYeah, I think that did it. I just tested a post as a regular user and it worked without any errors. I am short on time right now so if anyone else has a chance to try it out, that’d be cool. Here’s all I did (all in felsyncpost()):
1) added
$bb_current_user
to the globals2) commented out line 36
3) added
$bb_current_user = $current_user;
in its place.Try it out.
-
AuthorSearch Results