Search Results for 'code'
-
Search Results
-
Topic: font size and color plugin
I was wondering if there’s a plugin already out there for font size and font color. They should enable the font tag or style=””; in the tags. Also, why can’t we use heading tags such as
<h1>
or choose an image width and height in our image tags?Topic: Excerpts
I’m in the process of theming bbPress not to look like a forum, but rather a blog with multiple posters
. The one thing I’m stuck on, and there doesn’t seem to be any documentation on how to do this. How do you put excerpts in the front? The best example would have to be 9rules, I was wondering if that was custom code, or is there a plugin or a simple solution to achieve that? Thanks in advance.
Topic: Replace word in Post
Hello all,
I tried to realize a plugin that would allow me to replace some words by others in the post. I created the DB contained the words to replace and the word to put instead, i created the function and all is working fine, BUT, I don’t find how to use it on BBPRESS.
My function is something like
echo replace_words($TextToBeTransform,$WordToReplace)
, and the function use the DB to see what is be put instead of the $WordToReplace. As I can see, the post are printed out from the post.php of the template we do use.
I got this:
<?php
$tset="A trial phrase.";
$WordToBeReplaced="trial";
?>
<div class="threadpost">
<div class="post">
<?php echo replace_words( $test,$WordToBeReplaced); post_text()?></div>
<div class="poststuff">
<?php printf( __('Posted %s ago'), bb_get_post_time() ); ?>
<?php post_ip_link(); ?> <?php post_edit_link(); ?>
<?php post_delete_link(); ?></div>
</div>
It print me exactly as I want the “A trial phrase” replace trial by “new” (from the DB).
The problem is that when I want to apply this to the text of the post, post_text(), it won’t work at all. I see that this post_text() is actually applying filters and others to the text, which my cause my function to fail (no error, it just don’t replace the words).
Could someone tell me where should I apply my own filter replace_words() for it to be taken into account?
Thank you very much.
I logged in here on the bbPress forums to view my profile so that I could find my topics that I created a couple weeks ago. When I view my profile, it doesn’t show my posts or topics and my profile information is someone else’s:
crisdias
Member Since
January 21, 2004 (3 years)
Location
Rio
User Activity
Recent Replies
No more replies.
Threads Started
No more topics posted.
That’s not me, I’m not from Rio.. and I’ve only been a member for a year or so.
Also, I’m not able to edit my profile here.
Hi,
Don’t know if anyone knows how this works, but I though, let’s give it a shot.
I currently have the following code (javascript) to get a hash:
function serialize(s)
{
serial = $.SortSerialize(s);
alert(serial.hash);
};Now this has as output:
sort3[]=links&sort3[]=images
I want it to output:
links,images
How to do this?
sort3[]= needs to be filtered
& needs to replaced by ,
I’ve tried things like:
function serialize(s)
{
serial = $.SortSerialize(s);
alert(serial.hash);
var hash = serial.hash;
var temp = hash.replace(new RegExp( "sort3[]=", "gi" ),'');and
function serialize(s) {
serial = $.SortSerialize(s);
var hash = serial.hash;
var temp = hash.replace(/sort3[]=/gi,'');
alert(serial.hash);
};But none worked
Hope you guys can help.
Many thx,
Null