Search Results for 'code'
-
Search Results
-
I have installed BBcode lite, and I want to add my own custom bbcode tag, I tried making my own plugin to allow [tex][/tex], though I can still not fully understand the preg_replace() function. Would be greatly appriciated with some help.
What I am trying to achieve is:
[tex]some code here[/tex]…
The code in between the tags get’s converted to <img class=”latex-image” src=”/path/image.cgi?#code goes here with urlencoding#” alt=”” />
If it’s not too complicated to make the standard plugin to put code tags from the bbcode tags into additional pre tags when outputted, that would be great too.
[code] tags into additional pre tags when outputted, that would be great too.
I´ve modifyed Kakumei to the limit of my knowledge. See yourself at http://www.michaeljackson.no/forum
However, if I want to turn it into something different, I think the CSS is kind of clumsy made.
If you change width on one thing – you have to change it on something like ten other definitions too. Width of content, background, padding, corners etc etc.
So is there some other simplistic theme out there thats coded in a more unified way? Let´s say I want to change the size of the forum, I only want to input this ONCE, and have everything else fall in place automatically.
I know this is possible with CSS, by using percentage in sizes, instead of static pixel definitions.
Where can I find more BBPress themes anyway?
Topic: RSS Feed Issues
Hey guys,
I’m currently putting together my first site using WordPress % bbPress (they are both linked etc).
What i’m trying to do is display the 4 most recent active threads. By this, i do not mean the last 5 posts. I mean the latest 5 threads that have posts made in them. I hope that makes sense.
E.g.
[Thread Title] by [Original Poster]
I came across a script which links my bbPress RSS feed to my WordPress custom template, here it is:
<?php if(function_exists('fetch_feed')) {
include_once(ABSPATH.WPINC.'/feed.php');
$feed = fetch_feed('http://localhost/wordpress/bbpress/rss.php?forum=1');
$limit = $feed->get_item_quantity(4);
$items = $feed->get_items(0, $limit);
}
if ($limit == 0) echo '';
else foreach ($items as $item) : ?>
<ul class="latest">
<li>
<span class="title"><?php echo $item->get_title(); ?></span>
</li>
<?php endforeach; ?>I tried linking to “http://localhost/wordpress/bbpress/rss” etc but “http://localhost/wordpress/bbpress/rss.php?forum=1” was the only feed i could pick up. It doesn’t really matter though considering i’ll only have the single forum section anyway.
Now, this produces the following on my WordPress template:
Tigeran on “Your first topic”
[Last Post Author] on [Thread Title]
As stated before, i want it to appear like this:
[Thread Title] by [Original Poster]
I soon found out that i needed to edit the rss2.php file located in bbpressbb-templateskakumei folder as i’m using this template. Looking through it i came across this:
<title><?php post_author(); ?> <?php _e('on')?> "<?php topic_title( $bb_post->topic_id ); ?>"</title>& changed it to this:
<title><?php topic_title( $bb_post->topic_id ); ?> <?php _e('by')?> <?php post_author(); ?></title>But there is no change as it stays as the original. It’s like i cannot overwrite this file. Any help would be greatly appreciated.
Thanks.
Topic: Permalinks Issue
Looking through the forum, I see there have been many problems surrounding the “pretty URL” configuration, namely the .htaccess. We seem to be experiencing the same issue, if we change permalinks to the last option for a complete listing, we receive a 500 server error (we don’t have a .htaccess at all from the installation for some reason). Manually creating a .htaccess file with the following (found this from the forums) seems to stop the 500 but then throws 404s when browsing the forums/topics/profiles etc.
Options +FollowSymlinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /community/
RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]
RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&page=$2 [L,QSA]
RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]
RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ /tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ /tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]
RewriteRule ^rss/?$ /rss.php [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]
</IfModule>
We experienced the same issue with Invision Power Board, but adding “Options +FollowSymlinks” corrected the problem and we were able to have sexy URLs. For bbPress, however, it seems to not make a shred of difference. We are aware of the correct .htaccess code being supplied via the permalinks section in the ACP, but we never get provided with such code. Every time we change the permalinks setting, we are hit by a 500. .htaccess files are not my strong point as you have more than likely guessed.
The bbPress installation is located at /community while a WordPress installation (with working permalinks and .htaccess) is at root.
Any help would be appreciated,
Regards,
Rich
Topic: Questions for BBpress
Hi all
My first “stupid” questions off many here on this forum
.This site BBpress.org is that made in wordpress and only the forum is bbpress?
Thank you
Anders
Topic: Subforums FrontPage
I read this topic million times to now, now I`ll just ask a little help from moderators.
Here is my forum: http://www.gitariste.org/bbpress
As you can see there are PLENTY of subforums. And i want to hide them, but to count the posts from subforums to original. Let me give you an explanation.
FORUM Posts
(forum) Tech-Stuff 2
(sub-forum) Internet 4
to look like this:
FORUM Posts
(forum) Tech-Stuff 6
Which means, when i enter in Tech Stuff forum, i will see subforum and the posts in there.
Here is the code of my front-page.php
(Just show me the code that I need to change to get my goal)
Thxxxxx
Topic: Forum resize
I want a code that automaticly resize a form to the maximum width to any user and his monitor resolution. Something like there are no marines. Any code for that??
Im using Kakumei theme (default).
help?