Forum Replies Created
-
In reply to: Plugin aint working, what am I doing wrong
Fixed it myself. It was the:
FROM $bbdb->portal"
that didn’t work. Changed it intoFROM ".$bb_table_prefix."portal"
and added $bb_table_prefix; in the global as well and all seems to work fine now.Working code:
$pforum_id = $bbdb->get_var("SELECT pforum_id FROM ".$bb_table_prefix."portal");
Thx for the suggestions given
Null
In reply to: Plugin aint working, what am I doing wrongEeuuhh hey I am a noob, why doesn’t it make sense? $pforum_id is the variable and pforum_id the field in the table bb_portal (they are named the same).
The $pforum_id = 1 and is used in the last query. But the 1 can be different and is stored in de bb_portal table under pforum_id.
So I want to pull that 1 first from the db (thought using ‘$pforum_id = $bbdb->get_var(“SELECT pforum_id FROM $bbdb->portal”);’ would work) and then use that result in the last query…
Well that was the idea, but it aint working, how to fix it?
In reply to: Plugin aint working, what am I doing wrongAlready tried that (forgot to put it here too):
$pforum_id = $bbdb->get_var("SELECT pforum_id FROM $bbdb->portal");
But it doesn’t get the 1 out of the db. The query is good cause in phpMA it does return the 1. I get an error using this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY topic_time DESC LIMIT 0,10' at line 1]
SELECT * FROM bb_topics WHERE forum_id = ORDER BY topic_time DESC LIMIT 0,10
As you can see, the 1 isn’t pulled/ used (WHERE forum_id = ?)
In reply to: Plugin aint working, what am I doing wrongAny1?
In reply to: Plugin aint working, what am I doing wrongHmm it was part of a larger plugin code, took the part out and put it in the plugins folder and it worked here aswell. Problem must be elswhere with the other plugin code.
This results in a new question. My plugin has this code and works:
<?php
// Get Portal topics
function get_portal_topics() {
global $bbdb;
$pforum_id = 1;
$number_of_topics = 10;
return $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $pforum_id ORDER BY topic_time DESC LIMIT 0,$number_of_topics");
}
?>
But I also want to pull the 1 and the 10 from the database
$pforum_id = 1; and $number_of_topics = 10;
are now manually done…How to do this then?
In reply to: Plugin aint working, what am I doing wrongchanged some things it’s now:
function get_portal_topics() {
global $bbdb, $bb_table_prefix;
return $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = 1 ORDER BY topic_time DESC LIMIT 0,10");
}
Still same error when calling using:
<?php $portal_topics = get_portal_topics(); ?>
<?php foreach($portal_topics as $topic) :
Etc etc
Error:
Fatal error: Call to undefined function get_portal_topics()
In reply to: IE Display ProblemIn reply to: bbPortala re –
working on it to make it a plugin (next release) with an admin page
In reply to: IE Display ProblemGet a better browser
In reply to: stylr-rtl.css is not working (help)Not sure, but my guess the rtl is a template for the original css. Perhaps copy the parts form the rtl and overwrite them in the original. So overwrite, not copy them into it. Looked at the header and it seems it can be called there too as a stand allone file. Don’t know hot this should work though…
In reply to: Setting privs for writingNice, but where in the mod do you define wich forum is for admin posting only?
In reply to: New option: Only admin/mods can make new topicsThx but where in that mod do you define wich forum is for admin posting only?
In reply to: bbPortalHmm indeed something to add
Short answer for now:
It doesn’t differ anything from bbPress. Basicly it adds a portal page and a menu to bbPress. This way you can use the portal page to display important news on a frontpage or even blog, using your bbPress forum.
In reply to: Possible bug: H1 fonts different in every browserThx going to try that and also (if this works) use it in the bbportal css
Edit:
Tested it in IE7, Opera 9 and FF 2.0 and this fixes it for all browsers!
In reply to: Possible bug: H1 fonts different in every browserHahaha was too late to change it into: messed up
On topic:
This happens with a clean bbPress install, so what and where in the CSS do I have to change it, so all browsers produce the same (correct) font size?
In reply to: renaming index.php messes up lay-out?ardentfrost, I do this in template-functions.php I presume?
In reply to: renaming index.php messes up lay-out?Quote:
What does it matter that what bbpress sees at “front-page” isn’t the actual front page of your site? It’s just a moniker used throughout the program, it doesn’t have to mean anything to you.
Well wrong, I am working on a menu for the forum and it defeniatily is important that the call back is accurate.
Some excample code menu:
<li<?php
if ( is_front())
{
echo " id="current">";
?>
<a href="<?php option('uri'); ?>">Forums</a>
<?php
}
?></li>
Here you can see is_front and we also have is_forum so I need to add is_home aswell in order to make the menu work
Well I understand your explaination of how things work. I started home.php from index.php and edited/deleted things i didn’t need to make my own startpage. I also wanted to keep the normal index file, thats why I renamed them. Unfortunally the addons i did in the template functions don’t work unless i keep it like this:
case 'home.php' :
return 'front-page';
break;
And then the id won’t work too, cause
is_front()
is called (and not is_home) so it gets the front-page id.Well going to release my project very soon (as soon as I found a solution for my DIV problem), perhaps you can help me better then.
Really appreciate the time helping me out!!
Null
In reply to: Download TemplatesDon’t expect this as long as BBpress has no template thingy like WP has. At least I think…
In reply to: renaming index.php messes up lay-out?…… but then it would be identified as front-page as well. I am just curious of how this all works.. just wanna learn/understand…. Personally I find it strange so much needs to be changed to add a new page to the forum (even when renaming 1)
In reply to: renaming index.php messes up lay-out?I also added is_home () same result…
In reply to: renaming index.php messes up lay-out?Why doesnt this work? Re-checked the functionsfile 3 times now, but no where else in the file it asks for this.
I am experimenting with this new home.php page and adding these new functions to the file and renaming front-page.php aint solving the problem.
What files more need to be changed in order to make home.php and home-page.php work just like index.php and front-page.php (which I renamed)?
Thx
edit:
Changing:
case 'home.php' :
return 'home-page';
break;
to
case 'home.php' :
return 'front-page';
break;
Fixes the lay-out mess up, but still… WHY? Why doesn’t the renamed file home-page.php (front-page.php) work when the return is changed too?
In reply to: Adding a right sidebar at front pageAny 1?
In reply to: renaming index.php messes up lay-out?well I found the function and added this one:
case 'home.php' :
return 'home-page';
break;
Where home-page is the front-page renamed aswell but this aint working either, it’s still messed up
In reply to: Plugin – MessengersReally missing the online status here…
In reply to: Adding a right sidebar at front pageOkay almost there. I now have:
#hottags {
float: left;
width: 150px;
overflow-x: hidden;
position: absolute;
}
#discussions {
margin-left: 170px;
width: 420px;
position: absolute;
}
#rightbar {
margin-left: 610px;
width: 150px;
overflow-x: hidden;
position: absolute;
}
The right bar is alligned properly now, BUT the footer is moved up also. So the footer crosses the 3 collumns. All is mixed now, how to get the footer back down again?
Thx