Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,901 through 26,925 (of 32,466 total)
  • Author
    Search Results
  • _ck_
    Participant

    If you want to also use [pre] then you have to also edit the bbcode plugin to translate that tag too.

    Hmm, this is strange, I have ‘pre’ in the allow extra tags list but it’s not being added.

    Update: argh, bbPress unsets “pre” and “br”

    Alright, if you want bbcode processed in code/backtick sections, simply comment out this line in the plugin:

    // if (preg_match_all("|<code>(.*?)</code>|sim", $text, $backticks)) {foreach ($backticks[0] as $backtick) {++$counter; $text=str_replace($backtick,"_bbcode_lite_".$counter."_",$text);}}

    It’s right under

    $counter=0;

    meitershaker
    Member

    with pre or code, bbcode are not displayed…

    i need to see bbcodes in code tags because on my forum i use pre-formatted posts, for many uses

    in example for:

    pre strong test /strong /pre

    i would like to see strong and /strong …

    there is no way?

    ++

    #67445

    In reply to: Topic action hook

    _ck_
    Participant
    add_action('topicmeta','hello_world');
    function hello_world() {echo "<li>hello world</li>";}

    _ck_
    Participant

    I don’t understand what you are trying to do.

    IMHO, anything between code (or backticks) should ALWAYS be seen raw, unfiltered.

    If you need a tag similar to CODE, why not add the PRE tag to bbPress’s allowed tags. bbCode will work between PRE tags.

    meitershaker
    Member

    ah ck, it is possible to have the choice for that? in example, i would like to propose “posts templates” for presentations or interviews, and i need that.

    _ck_
    Participant

    bbcode is not displayed between code tags or backticks.

    This is a purposely designed feature, not a bug.

    chrishajer
    Participant

    Can you post a screenshot showing the functionality that is missing, or what the plugin is doing wrong?

    meitershaker
    Member

    Hi,

    i have a little problem with the bbcode lite plugin: when i use the code bbcode, and when i display others bbodes into it, this bbcodes are not displayed in code.. so it is possible to correct that?

    Bye

    ++

    #67496
    meitershaker
    Member

    “You could do it with two browser tabs or windows.”

    lol, euh yes, but not very user-friendly i think :D

    “Why are you looking to see other posts while editing another (just curious)? “

    because for me, edit a post for add or complete post, it’s more interesting to have always the entire thread. And for political forum, where the post are many times big, it’s necessary to have entire thread..

    so, in phpbb by default for example, it’s like that…

    i have no idea how to do it with a plugin, and i ask you for a little help :p

    ++

    #63945
    mrosenau
    Member

    You go here to get your “secret key” (there’s three of them. https://api.wordpress.org/secret-key/1.1/

    define(‘AUTH_KEY’, …

    define(‘SECURE_AUTH_KEY’, …

    define(‘LOGGED_IN_KEY’, …

    you place these in your wordpress wp-config.php file where the empty one were.

    Then you post the keys inside the secret key box in the bb press installation wizard.

    Or if you missed that part and your putting it directly into your bb-config.php file

    you replace: define(‘BB_SECRET_KEY’, …

    and everything after in on that LINE.

    with: your three secret keys.

    and that should fix everything, …that is if you have all your other wordpress – bbpress integration stuff lined up correctly :)

    #67406

    In reply to: Server Overload

    _ck_
    Participant

    No the zen optimizer is not an opcode cache, it’s just another keyhole optimizer. eAccelerator has a keyhole optimizer too but it doesn’t hurt anything to use them both. I use them both on PHP4 servers, PHP5 doesn’t need it.

    I think there are possibly THREE (simple) problems.

    One is a leftover corrupted eaccelerator cache left on your drive from a previous attempt that has to be cleared/deleted first.

    Two is an old eaccelerator that was built for a different version of PHP, it needs to be rebuilt with that script above.

    The last possibility might be the extension load order.

    (you can try disabling the zend optimizer altogether as it’s overkill when eaccelerator is running)

    So:

    1. Try deleting your old eaccelerator disk cache first

    rm -rf /tmp/eaccelerator

    2. Go into php.ini and look for the Zend section.

    It will look something like this but maybe not exactly like this:

    [Zend]
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.0.1
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.0.1
    zend_optimizer.version=3.0.1
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

    3. Make sure that Zend section is ABOVE (before) the eAccelerator section. You can also try commenting it all out with semi-colons before each line to disable it entirely.

    Last but not least, you should also delete the entire eAccerator section in PHP.ini and then run that script above.


    After thinking about this for awhile, I would put my money on the idea that your eAccelerator was built for an earlier version of PHP and MUST be re-compiled by that script.

    #67404

    In reply to: Server Overload

    _ck_
    Participant

    If you replaced the semi-colon and it still will not restart, you need to double check for a typo.

    Failing that, you can try removing all lines starting with eaccelerator. which should be at the very end of the php.ini or just putting semi-colons in front of them.

    I perhaps should have told you to make a copy of php.ini via cp php.ini php.bak but since it’s documented here we should be able too repair it.

    Actually, that install script probably made a backup of php.ini for you. Update: no unfortunately it does that when it’s about to copy and it didn’t make it that far. But you may have backup copies from other programs. See what files show up when you do a ls php* -latr

    #3960

    Topic: Papercraftmuseum.com

    in forum Showcase
    haagendazs1
    Member

    Hi,

    I reskinned a previous bbPress install to match the look of another site. Check it out:

    main site is http://www.papercraftmuseum.com/

    bbPress is at http://www.papercraftmuseum.com/pcmforum/

    I reskinned my other bbPress from http://dreampush.com/forums/

    notice the similarity? ;)

    #67444

    In reply to: Topic action hook

    thion
    Member

    All right, let’s try different question – I want to add additional informations to topicmeta when posting new topic – how can I achieve this? :)

    Or at least point me to a plugin that is doing something like this so I could learn there…

    #67423
    cartmanffc
    Member

    changes I made were related to the info being repeated twice and I was messing with the code to get the graphic bar working

    I somehow worked out the first problem and the latest version of Karma plugin (0.0.5) solved the second problem so now everything is working perfectly

    thank you for the update of the plugin and quick response

    #67467

    In reply to: Accents in username

    Amir Habibi
    Member

    Thanks for your replies. After reading / testing your links, I found a quick working fix. Here’s the plugin code :

    <?php
    /*
    Plugin Name: UTF-8 usernames
    Plugin URI:
    Description: This plugin enable utf-8 characters in usernames. Mbstring must be enabled in the php.ini.
    Author: Amir Habibi
    Author URI: http://www.residence-mixte.com/
    Version: 0.1
    */

    function sanitize_user_mbstring( $raw_username, $username, $strict = false ) {
    $raw_username = $username;
    $username = strip_tags($username);
    // Kill octets
    $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);
    $username = preg_replace('/&.+?;/', '', $username); // Kill entities

    // Usage of 'mb_ereg_replace' instead of 'preg_replace' to preserve accents.
    if ( $strict )
    $username = mb_ereg_replace('|[^a-z0-9 _.-@]|i', '', $username);

    return apply_filters('sanitize_user_mbstring', $username, $raw_username, $strict);

    }

    add_action('sanitize_user', 'sanitize_user_mbstring', 0, 3);
    ?>

    To work, you must have mstring enabled in your php.ini.

    Hope this will help !

    chrishajer : our board is in french

    #67482

    In reply to: hack help

    chrishajer
    Participant

    There is no author rank in the default installation. Are you talking about their title (like Member or Administrator)?

    If so, you would need to modify the template file for each place where the title appears (maybe it’s only on the topic pages, for each post?) If so, just remove it from the post.php file in your template directory:

    Remove this line:

    <small><?php post_author_title(); ?></small>

    That removes the author title from under the author’s name. If that’s not what you mean, then you have something installed that I do not. I think there is a post rating plugin and an author reputation (karma) plugin: maybe one of those is showing the rank you’re talking about.

    #67402

    In reply to: Server Overload

    _ck_
    Participant

    OH! You know what my tired eyes missed?

    Yes, you have the eAccelerator *settings*,

    BUT it’s disabled!

    Someone disabled it by putting a semi-colon in front of the actual binary:

    ;extension="eaccelerator.so"

    See that? To enable it, the semi-colon has to be removed, otherwise it’s dormant.

    Now if it wasn’t properly installed and the setting were just left in place, then removing the semi-colon may just halt PHP entirely and prevent your apache from working correctly.

    So try removing the semi-colon, save php.ini and then restart Apache via: service httpd restart

    If apache doesn’t restart, or it does but you can’t access web pages, then you need to go put back the semi-colon or remove the eaccelerator section entirely.

    If apache starts but you can’t find an “eaccelerator” section inside phpinfo() then it’s not really installed, or installed incorrectly. If that’s the case, then you need to remove all the existing eaccelerator lines listed above, and then run that install script again.

    By the way, if you don’t know what phpinfo() is, just make a file called phpinfo.php and put only this line into it: <?php phpinfo(); ?> and put it somewhere you can access it from the web on your server and then access it via the web.

    You will definitely see a speed boost when reloading pages once eAccelerator is properly installed and running.

    #67401

    In reply to: Server Overload

    _ck_
    Participant

    I probably made a bad assumption that it was not installed, though it definitely doesn’t come by default on a cpanel setup so that’s a bit unusual. Strange someone would put eaccelerator on there but not enable the mysql cache.

    You can look at your phpinfo() to find out if eAccelerator is really installed and active.

    That eaccelerator compress and compression level is just a waste of cpu time. I’d either set

    eaccelerator.compress="0"

    or

    eaccelerator.compress_level="1"

    By the way, the php configuration is located in

    /usr/local/lib/php.ini

    and the eAccelerator options are at the very bottom of the file if you ever have to manually edit them.

    #3958

    Topic: hack help

    in forum Installation
    doyle640
    Member

    does anyone know where (in what file) I would delete the code that displays the author’s rank in each post?

    thanks for any help.

    #3955
    wiggster
    Member

    Just a small cosmetic issue I noticed after installing the Version 1.0-alpha-1 zip file: after activating a few plugins, I noticed that the cells were not alternating classes correctly (or at least, what I’d think of as correctly).

    To test this, simply go to the Plugins page and activate a plugin. If the plugin row had a white background, it changes to green to show it’s active. If it had a gray background, it stays gray whether it is active or not. It seems to me that we’d want there to be either one or two shades of green to show the active plugins.

    The cause between this seems to be the CSS classes of the active rows alternated between <tr class="active"> and <tr class="active alt">; this means that the row with ‘active alt’ takes the properties of the ‘alt’ row, which overrides the background color of the ‘active’ class as it is lower in the style.css template. This derives from the function get_alt_class(), as defined in bb-includes/template-functions.php, which can assign two classes to one element.

    #65189
    Detective
    Member

    Well, i don’t know :p You need to provide me with better information, like: do you uploaded the plugin into the folder my-plugins ?

    Perhaps you didn’t uncompress the folder sack ??

    #3952

    Topic: Topic action hook

    in forum Plugins
    thion
    Member

    I was looking, but can’t find – so I’m still looking for hook, something like this:

    add_action('profile_edited', 'update_user_socialize');

    Above hook is used to add usermeta when editing profile – I’m looking for something that would add additional topicmeta when posting new topic – the following is not working:

    add_action('post_topic', 'post_new_job');

    So is there any hook like this?

    #67442
    _ck_
    Participant
    Database error: []
    SELECT * FROM bb_online WHERE user_id = LIMIT 1
    Caller: online_logout

    The user_id is empty in this case which causes the error.

    The question is why it’s empty.

    This could be a cookie problem, this could be an alpha bug.

    If you have no plugins running and switching to the default template does not make the error go away, it’s a bug and should be reported on TRAC (along with your configuration if possible, server type, PHP, etc)

    #67441
    _ck_
    Participant

    “Cannot modify header information – headers already sent”

    is one of those errors that will fool you by distraction because it’s an indication of another error, that happened before it, it’s not the actual primary error.

    “headers already sent” means one of the following (among other possibilities)

    1. You have whitespace at the start of end of a plugin (or template) BEFORE or AFTER the <?php ?> (usually after the end. Whitespace means new lines or spaces.

    OR

    2. Another plugin or configuration error has occured and sends a text message, which causes the headers to be sent. To find out what the real problem is, you typically can do a “VIEW SOURCE” on the page (from your browser menus) and you’ll see in plain text at the top of the page the real error before the “headers sent” error.

Viewing 25 results - 26,901 through 26,925 (of 32,466 total)
Skip to toolbar