Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,626 through 22,650 (of 32,481 total)
  • Author
    Search Results
  • #82350

    No problem :)

    #82427
    Michael
    Participant

    I uninstalled Mini-stats because I don’t like it. That script should be working.

    My statistics come from manually editing files – the plugins are not very helpful to me.

    I did write my own plugin – though you have to do manual editing to get the information to show. Simply add the following code to stats.php and place it in your plugins folder – and activate.

    <?php
    /**
    * Plugin Name: General Statistics
    * Plugin Description: Collects general statistics about the forum, including the newest users, online guests, and topic/post counts.
    * Author: Inniosoft
    * Author URI: http://www.inniosoft.co.cc
    * Version: 0.1
    */
    $mysql41 = true; // Change this if you have regular database problems

    function show_newest_users()
    {
    global $bbdb, $bb_table_prefix;
    $count = 3; // Edit this value to change how many users get displayed.
    if ($newestuser = $bbdb->get_results("SELECT * FROM ".$bb_table_prefix."users ORDER BY ID DESC LIMIT 0,".$count."")) :
    $counter = 0;
    foreach ($newestuser as $nu):
    $counter++;
    if ($count != 1 && $count > $counter) :
    if ($counter == $count - 1):
    if ($count == 2):
    $comma = " and ";
    else:
    $comma = ", and ";
    endif;
    else:
    $comma = ", ";
    endif;
    else :
    $comma = "";
    endif;
    if ($counter == $count) :
    if ($count > 1) :
    $stop = ".";
    else :
    $stop = "";
    endif;
    else :
    $stop = "";
    endif;
    $user = bb_get_user($nu->ID);
    $userdisplayname = (empty($user->display_name) ? $user->user_login : $user->display_name);
    $userprofilelink = get_user_profile_link($nu->ID);
    echo "<a href="".$userprofilelink."" title="See ".$userdisplayname."'s Profile">".$userdisplayname."</a>$comma$stop";
    endforeach;
    else : echo "Unable to fetch newest members(s). An error occured within the database.";
    endif;
    }

    function show_total_users()
    {
    global $bbdb, $bb_table_prefix;
    $totalusers = $bbdb->get_var( "SELECT COUNT(*) FROM ".$bb_table_prefix."users USE INDEX (PRIMARY);" );
    echo "".$totalusers."";
    }

    function show_total_posts()
    {
    global $bbdb, $bb_table_prefix;
    $totalposts = $bbdb->get_var( "SELECT SUM(posts) FROM ".$bb_table_prefix."forums;" );
    echo "".$totalposts."";
    }

    function show_total_topics()
    {
    global $bbdb, $bb_table_prefix;
    $totaltopics = $bbdb->get_var( "SELECT SUM(topics) FROM ".$bb_table_prefix."forums;" );
    echo "".$totaltopics."";
    }

    ?>

    Then, to show the information, add the following to either front-page.php or `footer.php:

    We have <b><?php show_total_users(); ?></b> registered members. Welcome to our newest members: <?php show_newest_users(); ?><br />
    Our members have made a total of <b><?php show_total_posts(); ?></b> posts in <b><?php show_total_topics(); ?></b> topics.</td>

    #82426
    bb-lover
    Member

    No Michael……. Its not working :-(

    I think you’ve installed mini_stats plugin……………….right?

    so show me complete footer file or tell me the plugin which you’ve used along this script….thanx

    #82425
    Michael
    Participant

    Hi bb-lover

    I recently wanted the same thing in my forum. I did not want to install complex plugins.

    If you’re looking for something like this: http://www.inniosoft.co.cc/devstation (look at the bottom), then you need to add the following to your footer.php file in your template’s directory:

    <?php function show_total_users()
    {
    global $bbdb, $bb_table_prefix;
    $totalusers = $bbdb->get_var( "SELECT COUNT(*) FROM ".$bb_table_prefix."users USE INDEX (PRIMARY);" );
    echo "".$totalusers."";
    }
    ?>

    Hope that helps :)

    Michael

    #32525
    bb-lover
    Member

    hi to all :-)

    i want to show just resisted users in my forum’s footer. how it will possible. but i don’t want to install mini-stats plugin…. and listen dears…. when we go to the dashboard of bbpress… there we can see the total resisted users in the “Right Now” Column. So I just want to show registed users in footer like that

    Total resisted users : e.g 500

    plz guide

    #32512
    grassrootspa
    Member

    This is a random question, but is this “Topic Views” plugin (“http://bbpress.org/plugins/topic/bb-topic-views/#post-275&#8243;) required to display ‘Topic Views” on one’s front page, etc? Or is there some sort of output code I am missing?

    We can display Topic Voices without a plugin using code built into the Core.

    The reason for my question is this, if a plugin is required, shouldn’t the “Topic Views” code be built into the Core as well? It’s a rather useful feature and seems to be used on tons of bbPress sites…

    #82398
    Michael
    Participant

    Thanks! :) :)

    #82324
    Michael
    Participant

    I’m glad it worked :) I’d probably want to find a way to enhance the plugin, but I don’t think I will as bbPress is soon to be changed. We had our first-ever IRC last night, and some major developments are going to come out of it – including things that have not yet been mentioned. So there’d be no point developing a plugin for an old version of bbPress.

    :)

    #55982

    In reply to: Show off your Forum !!

    Michael
    Participant

    @Taeo: That sounds very interesting! :) And you have an excellent forum! :)

    If you ever make it a stable plugin – please let us know. I, for one, would make huge use of it! :) I did mention how I my bbPress to be a community site at the recent IRC.

    Great work! :)

    #82352
    grassrootspa
    Member

    Just finished reading up…ecstatic to see this chat.

    Random thoughts (from someone who has been periodically messing with this for a year and still learning the ropes):

    -Don’t like the idea of eliminating bbPress’s stand alone ability and REQUIRING it be a WP plugin (some of us just want to run stand-alone forums without having to install WordPress first.) Prefer to keep it as a separate project.

    -Love the idea of adding new OPTIONAL features to the bbPress core (bbPress 1.1) . Here are my top 6:

    (1) Optional TinyMCE addition

    (2) Ability to edit plugins and templates from within bbPress admin

    (3) Ability to add widgets to certain areas without having to mess with the template (will be handy for easily editing ‘sidebar’ stuff from the admin page rather than having to play with the template code each time

    (4) More Avatar/Gravatar options, such as easily adjusting their size on Profile pages and including instructions on how to get a Gravatar built into the ‘edit profile’ pages. People want to customize their forum character. Make it easier for them to do it right out of the box: display a click-able link to Gravatar.com!

    (5) To combat spam registrations, build optional ‘Human Test’ and ‘Terms of Service’ registration page features (which can be further modified and tweaked by plugins/user modifications). I’m sure everyone else there has noticed ‘Spam’ user signups. A built-in human test and/or TOS box to check will go a long way in eliminating them!

    (6) Better bozo management notification on the admin page (have numbers pop-up like for new comments and plugins in case a legitimate user has been marked as a bozo. I’ve had this happen a couple times because I didn’t check the bozo list.

    -Pleased to hear bbPress.org design will be revamped and include Codex

    -THRILLED to see folks from the message board helping bbPress.org and the overall project in various areas

    -In summary, EXCITED about bbPress 1.1

    #82322
    bb-lover
    Member

    Finally i got it…..Thanks a lot…. Michael You are really a Gooooooooooooood Person :-)

    #82321
    Michael
    Participant

    The file should already exist in your bbPress Root.

    Mine looks like this:

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /devstation/

    RewriteRule ^rules/?$ /devstation/bb-page.php?page_id=1 [L]
    RewriteRule ^faq/?$ /devstation/bb-page.php?page_id=2 [L]

    RewriteRule ^page/([0-9]+)/?$ /devstation/index.php?page=$1 [L,QSA]
    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /devstation/forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ /devstation/forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ /devstation/ [R=302,L,QSA]
    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /devstation/topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/([^/]+)/?$ /devstation/topic.php?id=$1 [L,QSA]
    RewriteRule ^topic/?$ /devstation/ [R=302,L,QSA]
    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /devstation/tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/([^/]+)/?$ /devstation/tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ /devstation/tags.php [L,QSA]
    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /devstation/profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/?$ /devstation/profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /devstation/profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/([^/]+)/?$ /devstation/profile.php?id=$1 [L,QSA]
    RewriteRule ^profile/?$ /devstation/profile.php [L,QSA]
    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /devstation/view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([^/]+)/?$ /devstation/view.php?view=$1 [L,QSA]
    RewriteRule ^rss/?$ /devstation/rss.php [L,QSA]
    RewriteRule ^rss/topics/?$ /devstation/rss.php?topics=1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/?$ /devstation/rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/topics/?$ /devstation/rss.php?forum=$1&topics=1 [L,QSA]
    RewriteRule ^rss/topic/([^/]+)/?$ /devstation/rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/?$ /devstation/rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/topics/?$ /devstation/rss.php?tag=$1&topics=1 [L,QSA]
    RewriteRule ^rss/profile/([^/]+)/?$ /devstation/rss.php?profile=$1 [L,QSA]
    RewriteRule ^rss/view/([^/]+)/?$ /devstation/rss.php?view=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ /devstation/index.php [L]
    </IfModule>

    # END bbPress

    Most of those should already be there. I have separated the two rules at the top so you can see how it is done for pages.

    If your site has a forum directory (ie the forum does not reside on the top-level of your site, then you should remove the “devstation/”. If it does, then replace “devstation/” with your forum’s directory.

    Regards

    Michael

    #82319
    bb-lover
    Member

    please send me complete code… i can’t understand it…

    of if you can send me .htaccess file then i’ll be happy

    #32510
    Raize
    Member

    I’ve been looking for a solid forum software for quite some time now. vBulletin has a lot of features, but it’s too bloated…it’s “Web 1.0”

    I explored Vanilla, EsoTalk, and now bbPress. I thought bbPress would be a good option, but it seems like the developer community has completely abandoned it over the past year. There are no themes, no plugins, and barely any updates to the core forum. As I kept looking for themes, I found this on bbShowcase:

    The bbPress Showcase has been discontinued.

    The removal of Sam Bauers and the halting of bbpress.org 2.0

    was a clear and final sign that there is no interest in allowing

    bbPress to become a mature, robust program and community.

    By now bbPress 1.5 could have been in alpha but instead

    bbPress development has been deliberately stagnated,

    which should be a very alarming warning to everyone.

    In addition, bbShowcase had only six donations in 2009,

    which indicated to me there was no interest in my work.

    My code will remain on bbpress.org as open source GPL

    for those that wish to use it, however I caution you to

    consider bbPress’s lack of leadership before continuing to use it.

    Now I’m back at square one again. Not knowing which forum software to use.

    #82347

    Pretty much; something like this:

    <a href="<?php forum_link( $topic->forum_id ); ?>"><?php forum_name( $topic->forum_id ); ?></a>

    #32508
    Michael
    Participant

    Greetings

    I seem to be having many problems with my forum, most of them being mine.

    So here goes the next one:

    I am in the process of creating an additional item on the topic page that lets the member share the topic on Facebook, Twitter, and the like. I do not wan’t to use SocialIt as it puts it on every post, which starts to look messy. I have a neat forum.

    So, I opened topic.php in my template’s directory and found the place where I need to add the code to achieve this.

    At first, I added this, which worked: (bb_current_page_url is my own function)

    <li><?php printf(__('Share this topic on <a target="_blank" href="http://www.facebook.com/sharer.php?u=%1$s">Facebook</a>'), bb_current_page_url() ?></li>

    Then I wanted to add a title as per Facebook’s Sharer specifications. This means that I must add &t=<the-title>, where I put the cutom title in <the-title>.

    So I did this:

    <li><?php printf(__('Share this topic on <a target="_blank" href="http://www.facebook.com/sharer.php?u=%1$s&t=%2$s">Facebook</a>'), bb_current_page_url(), topic_title()) ?></li>

    and it returned this:

    DataSets and DataTableAdaptersShare this topic on Facebook

    <string>Note: If you hover your mouse over “Facebook”, you’ll see that the URL has been cut off – which is why the title appears before the entire printf() function.

    It should return this:

    Share this topic on Facebook

    I’m obviously doing something wrong with printf(), but I doubt it as it’s literally a copy-paste from the other printf()’s on that page.

    I also want to stick to printf() as I will have multiple sites to link to, and I do not want to keep repeating things. I just want to refer to %1$s and %2$s for each entry.

    Could anyone help me get out of this mess?

    Michael

    #55978

    In reply to: Show off your Forum !!

    Michael
    Participant

    Greetings :)

    I guess I could do the show off thing. Here’s mine: Dev:station

    It has quite a lot of plugins installed – and everything works – though there may be a few bugs that I don’t know of.

    Plugin List:

    Admin Add User

    Allow Images

    Avatar Upload

    BBCode Lite

    BBCode Toolbar

    bbPM

    BBPress:SyntaxHiliter

    bbPress Moderation Suite

    bbPress Smilies

    Bozo Users

    Favicon

    General Statistics (my own plugin)

    Hot Tags Plus

    Hot Topic

    Human Test for bbPress

    Indicate New Posts

    Member List

    bbPages

    Post Count Plus

    Project Honey Pot

    Read-Only Forums

    Related Topics

    Reputation

    Signatures

    Simple Online List

    Support Forum

    Terms of Service

    Topics per Page

    Twitter

    I know the address to this forum isn’t that great – I’ll be getting a .com domain for it some time next year (hopefully January).

    Enjoy! :)

    Michael

    #82280
    Michael
    Participant

    Hi Ben

    I’m running quite a few:

    Admin Add User

    Allow Images

    Avatar Upload

    BBCode Lite

    BBCode Toolbar

    bbPM

    BBPress:SyntaxHiliter

    bbPress Moderation Suite (obviously ;) )

    bbPress Smilies

    Bozo Users

    Favicon

    General Statistics (my own plugin, not the problem – have tested it extensively)

    Hot Tags Plus

    Hot Topic

    Human Test for bbPress

    Indicate New Posts

    Member List

    bbPages

    Post Count Plus

    Project Honey Pot

    Read-Only Forums

    Related Topics

    Reputation

    Signatures

    Simple Online List

    Support Forum

    Terms of Service

    Topics per Page

    Twitter

    Unread Posts (I should disable this one as I already have Indicate New Posts enabled)

    I have gone through and disabled each one – this did not solve the problem.

    Any help would be great. :) Thanks

    #82316
    Elias
    Member

    Since bbPress 1.0.x you have to use my-languages, the path bb-includes/languages is correct for older bbPress versions.

    #81922
    Michael
    Participant

    Hi

    You need to open the PHP file and edit the settings in there.

    :)

    #82346
    Michael
    Participant

    Thanks – works like a charm: http://www.inniosoft.co.cc/devstation

    Is there maybe a way to get the link to that forum?

    Would it maybe be forum_link( $topic->forum_id )? ^^,

    #82345

    Try the following:

    <?php forum_name( $topic->forum_id ); ?>

    #82318
    Michael
    Participant

    Unfortunately, this plugin was meant to have support for Permalinks – hence the unused Page slug in the bbPages settings – but that never came about.

    I recently had this problem too – so I manually edited my .htaccess file in the bbPress root.

    So, I turned my Rules page from this:

    http://www.inniosoft.co.cc/devstation/bb-page.php?page_id=1

    to

    http://www.inniosoft.co.cc/devstation/rules/

    You need to open your .htaccess file in the bbPress root and add the following for each page, replacing <your-page> with the url you would like:

    RewriteRule ^<your-page>/?$ /bb-page.php?page_id=1 [L]

    #82202
    Michael
    Participant

    You obviously don’t know what BBCode is at all – so let me explain.

    BBCode is an alternative to HTML for people to use in their posts. For example, if they wanted to have bold text, they would put this in their post:

    Text

    You can download BBCode lite for bbPress here: https://bbpress.org/plugins/topic/bbcode-lite/

    You then need to save the'bbcode-lite.php file in your my-plugins directory. If you do not have one, you will need to create it. Then go to your admin panel, Plugins, and install BBCode Lite.

    Then, in your posts, you will need to enter a URL like this:

    http://www.example.com

    or, with a title

    My Example Site

    Hope this solves your problem. :)

    #82201
    nivosh
    Member

    what’s bbcode lite, and how can it be used to fix the problem?

    thanks

Viewing 25 results - 22,626 through 22,650 (of 32,481 total)
Skip to toolbar