Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,676 through 28,700 (of 32,499 total)
  • Author
    Search Results
  • #61706
    richsad
    Member

    Maybe I’m being thick today, but I don’t really see how a plugin solves my problem after looking at them. Indeed there is an apply_filter call to read the user profile info, but the names of the keys in the associative arrive are assumed in various places around the code. As far as I can tell there wasn’t any forethought into an admin wanting to replace the user info collected at registration with something relevant to the specific forums domain.

    I think either I am missing some aspect of the plugins or this an area that could be improved upon for customization by the admin.

    Am I missing something that anyone can see? The problem appears to be akismet.php where the key of the user profile info is hardcoded into the code. In my version of the file line 86 and 148 seem to assume the keys to info have not been modified.

    #61721
    Trent Adams
    Member

    If the list of users to delete is empty, it gives the following error”

    Warning: Invalid argument supplied for foreach() in /public_html/my-plugins/EnhancedRegistration/OptionsPage.php on line 37

    0 user(s) have been deleted!

    Trent

    #61719
    vafaaaan
    Member

    ok .. activated manually with the code .. worked, act_code is gone.

    Keep up the good work

    #61569

    In reply to: How Do I Do This?

    livibetter
    Member

    Comment out third line from bottom in forum.php like

    <?php // post_form(); ?>

    #61718
    livibetter
    Member

    Auto-deletion would be considered in next release.

    Users will get TWO mails. I will see if there a way to send only one mail.

    @vafaaaan:

    This plugin thinks user has act_code usermeta hasn’t activated their account. If a account has been activated, then it doesn’t have act_code usermeta.

    #61567

    In reply to: How Do I Do This?

    livibetter
    Member

    Thats works on my server. Are you sure you edited right front-page.php? Do you have more than one template?

    #53530
    Null
    Member

    You can never stop spam registration if people hire people to sign up. Nor captcha or askimet or any other program can prevent that.

    We can however block all registratingspambots with an empty www field like the starting post. Only problem is, it aint working :(

    #61566

    In reply to: How Do I Do This?

    chgogrrl99
    Member
    <?php bb_get_header(); ?>

    <?php if ( $forums ) : ?>

    <div id="hottags">
    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>
    </div>

    <div id="discussions">
    <?php if ( 0 > 1 ) : ?>

    <h2><?php _e('Latest Discussions'); ?></h2>

    <table id="latest">
    <tr>
    <th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Last Poster'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><small><?php topic_time(); ?></small></td>
    </tr>
    <?php endforeach; endif; // $super_stickies ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><small><?php topic_time(); ?></small></td>
    </tr>
    <?php endforeach; endif; // $topics ?>
    </table>
    <?php endif; // $topics or $super_stickies ?>

    <?php
    if ( bb_forums() ) :
    global $bb_forums_loop;
    $_loop =& $bb_forums_loop;
    bb_forum();
    $skipForum = false;
    while ($_loop) :
    if ($_loop->walker->depth == 1) {
    if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7, 18, 19, 20, 101)))
    $skipForum = true;
    if ($skipForum) {
    ?>
    <h2<?php bb_forum_class?>><a href="<?php forum_link(); ?>">Click Here To Go To the <?php forum_name(); ?> Forums</a></h2>
    <?php
    }
    else {
    ?>
    <h2<?php bb_forum_class?>><?php forum_name(); ?></h2>
    <table id="forumlist">
    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php
    }
    }
    elseif (!$skipForum) {
    ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php
    }
    bb_forum();
    if ($_loop === null || $_loop->walker->depth == 1) {
    if (!$skipForum)
    echo '</table>';
    $skipForum = false;
    }
    endwhile; ?>
    <?php endif; // bb_forums() ?>

    <?php if ( bb_is_user_logged_in() ) : ?>
    <div id="viewdiv">
    <h2><?php _e('Views'); ?></h2>
    <ul id="views">
    <?php foreach ( bb_get_views() as $view => $title ) : ?>
    <li class="view"><a href="<?php view_link(); ?>"><?php view_name(); ?></a></li>
    <?php endforeach; ?>
    </ul>
    </div>
    <?php endif; // bb_is_user_logged_in() ?>

    </div>

    <?php else : // $forums ?>

    <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h3>

    <?php post_form(); endif; // $forums ?>

    <?php bb_get_footer(); ?>

    #61565

    In reply to: How Do I Do This?

    livibetter
    Member

    Please post entire front-page.php.

    #61564

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    I got all the id’s and entered them into the line in the code…mine where 2, 3, 4, 5, 6, 7, 18, 19, 20, 101

    then I uploaded the new frontpage.

    Everything looks the same. So now I’m wondering how I use this. I mean, when I try to create a link from the main site to the “Chicago Forum” what do I put in the link box? http://theangrywaiter.com/forum takes me to the forum page, but nothing I do seems to take me directly to the Chicago Forum.

    I must be doing something wrong

    #61562

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    I did…but if I click edit on the individual cities I see that the “positions” for each are different than the id’s I entered in the new code.

    Maybe I should go back and enter those numbers instead.

    #61716
    vafaaaan
    Member

    Great! .. im gonna try it right now :) brb..

    Update 1: No mail yet. Dont know if i have set that up correct. Can see this in phpmyadmin, in wp_users..

    ID : 2

    user_login : xxxxxxx

    user_pass : 63db6f94498b383aa4eebb38b9d41505

    user_nicename :

    user_email : xxxxxx@gmail.com

    user_url :

    user_registered : 2007-11-26 08:21:45

    user_activation_key :

    user_status : 0

    display_name :

    user_activation_key shouldnt be empty ?

    Update 2: in wp_usermeta..

    umeta_id : 12

    user_id : 2

    meta_key : act_code

    meta_value : 12345678 (eight numbers & letters value)

    dammit! this is a winxp test server with wamp.. dont think mail() works here :(

    #61561

    In reply to: How Do I Do This?

    livibetter
    Member

    Why don’t you just backup current front-page.php and replace with new code, then see what you will get?

    #61559

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    Ok…so I changed the code.

    Now, what your saying is that on our main site if we build a “Forums” Page and put:

    Click Here To Go To The Chicago Forums

    Click Here To Go To The Atlanta Forums

    Click Here To GO To The Denver Forums

    ect.

    it will automatically take people there?

    #61558

    In reply to: How Do I Do This?

    livibetter
    Member

    The Chicago forum’s id is 2

    If the rest forums’ id are 3, 6, 12, then you should replace that line with

    if (in_array(get_forum_id(), array(2, 3, 6, 12)))

    PS. you don’t need to add additional links, the new code will take care of that you mention in your question #4.

    #61557

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    Ok, so I have the id’s. So I should replace the old code you gave me with the new code?

    Then, on my main site I can add them as links:

    For example: “Chicago Forums” link is http://www.theangrywaiter.com/forum/id=2

    Is this correct?

    #61555

    In reply to: How Do I Do This?

    livibetter
    Member

    You have to put the forum ids into this line (no need to put them all into this line, you can let big cities to be shown in front-page.php)

    if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))

    You can get those id in Forum Management by move mouse over Edit links.

    Those ids should belongs to top-level forums.

    New code (edited):

    <?php
    if ( bb_forums() ) :
    global $bb_forums_loop;
    $_loop =& $bb_forums_loop;
    bb_forum();
    $skipForum = false;
    while ($_loop) :
    if ($_loop->walker->depth == 1) {
    if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))
    $skipForum = true;
    if ($skipForum) {
    ?>
    <h2<?php bb_forum_class?>><a href="<?php forum_link(); ?>">Click Here To Go To the <?php forum_name(); ?> Forums</a></h2>
    <?php
    }
    else {
    ?>
    <h2<?php bb_forum_class?>><?php forum_name(); ?></h2>
    <table id="forumlist">
    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php
    }
    }
    elseif (!$skipForum) {
    ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php
    }
    bb_forum();
    if ($_loop === null || $_loop->walker->depth == 1) {
    if (!$skipForum)
    echo '</table>';
    $skipForum = false;
    }
    endwhile; ?>
    <?php endif; // bb_forums() ?>

    #2633
    livibetter
    Member

    Should be used for TESTING ONLY

    Download this file

    Install:

    Put activate.php to your template folder.

    Put bb-activate.php to your bbPress root folder.

    Put EnhancedRegistration directory to my-plugins

    Only tested on kakumei template without other plugins. Currently, it only support user activation. User will receive an additional mail with a code for activation. They can click the link within that mail, or manually navigate to the activation page.

    And Key Master can delete user haven’t activated over ## hours.

    Possible features in later releases: Registration Approval, Registration Email Verification.

    Please tell me what do you think!

    #61553

    In reply to: How Do I Do This?

    chrishajer
    Participant

    I was looking into this a little bit and ran into something weird. Click on a subforum in any of the cities and see where you end up. Check the breadcrumb navigation. Something doesn’t seem right there.

    Also, you should change the a:hover line in your style.css as well. When you hover over a black link, it turns green now. You might want to make that match the red in your logo maybe.

    a:hover { color: #006400; } on line 22, change the #006400 to your new hover color.

    #61552

    In reply to: How Do I Do This?

    chrishajer
    Participant

    Color, bold and underline looks good.

    I see the latest discussions are gone.

    I see a logo but it’s under the login box, in Firefox 2.0.0.9 anyway. I won’t mess with that at all since you are going to redo it. You could move it over with some left-padding in the CSS if you wanted to.

    For now, you could do something like add a text link to the website home, like I did here a long time ago:

    http://www.riversideinfo.org/forum/

    That is a modification to header.php to add that text link, and I think I modified the style.css to move it where I wanted it.

    Regarding the cities, where’s livibetter? :) (seriously, I haven’t looked at it at all…)

    #61551

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    Alright…this is working great!

    I re-added the banner (it’s 760 x106 but I’m thinking of making a new one with the logo and something that says “Home Page” and then linking that to the main site).

    And, yes, I did use the code above to make the different cities.

    #53529
    chrishajer
    Participant

    sambauers, are you saying I have to move to India or China to get a job like that? More work being taken away from Americans … :D

    Seriously though, I have a few spam users registered every day, and they always link their username to a website, but there are never any posts by them (maybe I delete them soon enough after registering that they never make a post.) So, what good is it creating a user with a link to a website in a profile they never post from? Would a list of users show up somehow in a stock bbPress install where the links there could actually drive traffic to them somehow? I know WHY they do it, but if their username is never shown next to a post, how would the link to their site ever get picked up? I’ve always wondered about that.

    #61550

    In reply to: How Do I Do This?

    chrishajer
    Participant

    > 1. I’d like to add our logo with either a button

    > that says “Home” or something indicating back to

    > the main page. I tried to add the logo included

    > in a banner, but it wasn’t aligned correctly.

    Try inserting it again so people can see it and help you get it aligned properly

    > 2. I’d like to make the green lettering a bolder

    > Color, maybe even change the size of the font.

    In your theme, find this around line 21 and change to whatever you like:

    a { color: #2e6e15; text-decoration: none; }
    a:hover { color: #006400; }

    You can change the color and font weight and size there.

    > 3. I’d like to eliminate “Latest Discussions”

    > entirely.

    In front-page.php, on line 11, change this:

    <?php if ( $topics || $super_stickies ) : ?>

    to this

    <?php if ( 0 > 1 ) : ?>

    That originally said “if there are topics or super_stickies” then do the rest, which is show the latest discussions. Changing it as shown will cause it to never show “Latest Discussions” because zero is never greater than one (the statement always evaluates false so the code block is skipped). If you want to actually rip out the code that would display the Latest Discussions, you would delete lines 12 to 41 in the file front-page.php in your theme. Those are the line numbers in the stock file, your line numbers might be different. Delete from

    <?php if ( $topics || $super_stickies ) : ?>

    to

    <?php endif; // $topics or $super_stickies ?>

    inclusive.

    > 4. This message board is huge…Is there a way

    > to anchor each city so we can put links on a

    > page on the main site. Example: “Click Here To

    > Go To the Chicago Forums” and they are taken to

    > the Chicago part of the board.

    I have to think about that one. I imagine there’s a way to do it, but I haven’t ever done it. Since the name of the city is not a link, you’d have to make that a link to that category, and then suppress the listing of the child forums on the front page. Or, you could just create a new front-page.php that links to only those parent forums. Can you post a link to a screenshot of how you accomplished the different cities like that? Something from your admin panel, or a link to the post here that guided you toward separating things into cities like that?

    WAIT: is it this that allowed you to separate the cities? I think livibetter could probably help you do what you want there since that was their code initially.

    #58209

    In reply to: bbSync

    vafaaaan
    Member

    Yess .. i did it..

    Wrote some lines that gets a posts TAGS .. how do i proceed ?

    <?php
    //
    // Fetch a WP posts tags by Kent
    //

    $db_type = 'mysql';
    $db_host = 'localhost';
    $db_name = 'xxxxx';
    $db_user = 'xxxxx';
    $db_pass = 'xxxxx';

    // Just picked one, for testing.
    $post_id = "6";

    @mysql_connect($db_host,$db_user,$db_pass) or die ("Couldnt connect to database!");
    @mysql_select_db($db_name) or die ("Couldnt select the requested MySQL table!");

    $fetch_post_tags = mysql_query("
    SELECT
    wp_posts.ID AS POID,
    wp_term_relationships.object_id AS RELID,
    wp_term_relationships.term_taxonomy_id AS TAXID,
    wp_term_taxonomy.taxonomy AS TAXONO,
    wp_term_taxonomy.term_id AS TAX_TERID,
    wp_terms.term_id AS TERID,
    wp_terms.name AS HOT_TAG_NAME
    FROM
    wp_posts,
    wp_term_relationships,
    wp_term_taxonomy,
    wp_terms
    WHERE
    (wp_posts.ID = wp_term_relationships.object_id AND wp_posts.ID = '$post_id')
    AND
    (wp_term_taxonomy.taxonomy = 'post_tag' AND wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
    AND
    (wp_term_taxonomy.term_id = wp_terms.term_id)
    ORDER BY wp_terms.name ASC
    ") or die ("Cant fetch data!");

    if (mysql_num_rows($fetch_post_tags) > 0)
    {
    $rowid = 1;

    echo "<table border="1">";
    echo "<caption>WP posts tags</caption>";
    echo "<tr style="background-color: #DDEAD5;">";
    echo "<th scope="col">Post ID</th><th scope="col">Tag</th></tr>";

    while ($blog = mysql_fetch_array($fetch_post_tags))
    {

    if ($rowid == 1)
    {
    echo "<tr><th scope="row">" . $blog['POID'] . "</th>";
    }
    else
    {
    echo "<tr><th scope="row">&nbsp;</th>";
    }

    echo "<td>" . $blog['HOT_TAG_NAME'] . "</td></tr>";

    $rowid++;
    }

    echo "</table>";
    }
    else
    {
    echo "Found nothing!";
    }
    ?>

    Please dont kill me.. im no pro coder.. :)

    #58206

    In reply to: bbSync

    fel64
    Member

    Yo. That does help, cheers William. It sounds like I’m not getting rid of comments properly. For the ones that show up all duplicate, is the comment_type in the database comment?

    vafaaaan, you’re always better off using the API. The actual relationship is this (with table names taken from vague memory) if I recall correctly:

    wp_terms lists all the terms, stores data for them

    wp_term_type assigns a type to the terms (so it says whether a term is a tag or a category)

    wp_term_relationships links a term to an object, like a post

Viewing 25 results - 28,676 through 28,700 (of 32,499 total)
Skip to toolbar