Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 44 total)
  • Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Is this save to install on live site ?

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Got it :) problem was the $cat_id

    			$category = get_the_category($post_id); 
    			bp_activity_add( array( 'user_id' => (int) $post->post_author, 
    										 'action' => apply_filters( 'bp_blogs_activity_new_post_action',       $activity_action,  $post, $post_permalink ), 
    										 'content' => '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', 
    										 'primary_link' => $post_permalink, 
    										 'component' => 'groups', 
    										 'type' => 'activity_update', 
    										 'item_id' => $category[0]->cat_ID, 
    										 'recorded_time' => bp_core_current_time(), 
    										 'hide_sitewide' => false ) );

    [solved]

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    I have this within the bp_blogs_record_post function. Ofcourse its not working, can somebody help me on the right track please, thank you very much $cat_id is same id as the group id.

    `bp_activity_add( array( ‘user_id’ =>’2′,
    ‘action’ => ‘New Post’,
    ‘content’ => ‘<a href=”‘ . $post_permalink . ‘”>’ . $post->post_title . ‘</a>’,
    ‘primary_link’ => $post_permalink,
    ‘component’ => ‘groups’,
    ‘type’ => ‘activity_update’,
    ‘item_id’ => $cat_id,
    ‘recorded_time’ => bp_core_current_time(),
    ‘hide_sitewide’ => false ) );`

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Can somebody tell me where I can find the part the records the activity for posts ?

    I would like to modify the part that inserts activity when a post is created.

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Go to pages -> Trash -> empty all pages from trash
    And in the page make sure the permlink says groups and not groups-2 (edit if needed)

    edit -> ok -> update page

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Found problem for my first question, dont have the answer it though

    Undefined property: BP_Groups_Component::$table_name

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Well basicly you can add conditions or remove conditions.

    if (!is_user_logged_in) { 
     echo "your link"; 
    } 

    so without the else, there is no else, and will not echo out anything if it does not match your condition.

    You can read about it here http://php.net/manual/en/control-structures.else.php and here http://php.net/manual/en/language.operators.comparison.php not really rocket science so easy to understand

    And the Lost link, are hardcoded in the wp core.. however i suggest you do not go there.. but ask somebody that can do it for you..

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Nice.. I am glad it all Finally worked out for ya :)

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    There you go…

    When you copy and paste code from here the “<– Quotation marks like those are copy and pasted wrongly!
    Ill adjust your text widget with your register code :) give me a few secs

    All done :) Have fun!

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Yes I did, and replied, its not the code, but rather the code in your text widget.
    You probably used something like echo (bloginfo(‘url’) . ‘ which will echo out http, eval and http will have problems so you have to use something like /register-2/ instead

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Ok updated your functions.php, you added the code after the ?> closing tag at the bottom of your functions.php so, whatever php code you put in your widget would still not be parsed.

    Now can do a simple test by just creating a text widget with the following

    <?php
    echo “Yes, php parsing works”;
    ?>

    If the output of that is Yes, php parsing works without the echo” “; part You are set :)

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Or give me access to your admin panel (temporary)

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Mira lo que dice to proveedor es que 1. La instalacion del wp no fue hecho correctamente (la generacion del base de datos), 2. el codigo img no esta siendo generado. (vea abajo las cosas que puede hacer para determinar donde esta el problema)

    Disculpa si es que no lleva tildes en el texto :) sigue siendo Europeo :)

    Ahora, lo que puede hacer es instalar tu pagina localmente en tu maquina. Asumiendo que tienes windows, baja WAMP. Esto ya viene con todo mysql, php, apache y hagas lo siguiente: para debuggear tu pagina web, y encontrar la problema.

    1) en su pagina web, desinstalar buddypress (plugin-> desactivar->borrar), borra la carpeta /wp-content/plugins/ ->buddypress por completo y instala el plugin buddypress de nuevo.
    2) Reinstalar WordPress por completo, veo que su pagina web aun no esta al aire
    3) instala un wp, installa el plugin buddypress (desde 0), vea si funcione todo ahora
    4) instala un backup de tu wp, y su buddypress, tendras que exportar tu base de datos y importarlo en tu bd localmente, ahora vea si esta funcionando.

    5) Cambiar al default Theme de wp (no del buddypress) vea si ahora si vez imagenes
    6) desactivar todos los plugins instalados, y activalos 1 por 1

    Pregunta, en cuanto creas un articulo (entrada / post ) con un imagen, si se ve el imagen en el post ?

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Can you send me your functions.php ? ol4pro at gmail.com (zip it first)

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    @mercime What if I gave the Groups the same ID as the Categories and then treat all new_blog_posts as an activity_update using Category id as Group id using the bp_activity_add() ? would that be possible ?

    That way, they are just Activity / Wall posts assigned to the group, instead of creating a whole new set of links around the website as done with the “blog categories for groups”

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    That plugin will not insert it into the Activity of a Group but put it into a newly created link on the user navigaiton menu “Blog” http://domain.com/groups/artistas-musica/blog <–

    Is there a hack available for making it go straight the the Activity of Group ?

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Si deseas que te lo explica en espanol me avisa (soy europeo pero, ya vivo por mas de un decada en latinoamerica

    Have you tried debugging it locally (and the link to your site is ?)

    You can use whatever http server you like, either install it manually using apache / php / mysql or use a more simpler app like WAMP http://www.wampserver.com/en/

    1) do a fresh install
    2) install of a backup of your site. And see if it works locally.
    3) change to a default wp theme
    4) disable all plugins, then enabling each plugin 1 by 1 (see if plugin is causing conflicts)
    5) write permissions, which you seem to have

    This just helps to narrow down the problem, so you can know where to look.

    And what you hosting company says, is that the wordpress installation went wrong, that it did not populate the tables necesary for wordpress to work correctly.

    Did you try to reinstall WP?

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Puedes darme el texto que te mando su proveedor de alojamiento ? Compruebe que la carpeta wp-content/uploads/avatars existe y que tiene los permisos 0755

    Si no existe ingresa al cpanel -> administrador de archivos, crea la carpeta avatars -> click derecha avatars -> cambiar permisos -> 7 5 5

    edit: never mind..

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Change the the http part, in echo "<a href='/register-2/'>Register</a>";

    so it becomes this using http will give problems do to the eval()

    
    <?php
    if ( !is_user_logged_in() ) { /* if the user != logged in */
    echo "<a href='/register-2/'>Register</a>";  /* echo the link*/
    } else { /* else if user is logged in */
    echo "Welcome Back";  
    } /* closing the if else statement */
    ?>
    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Don’t worry,

    The first part what you added in functions.php will make sure that we can put in php code into the Text Widget, this is normally not allowed. It will simply not parse the php code. And that is the reason why u don not see the desired results on your screen.

    So now you can add a Text Widget and put in PHP code

    So now the notice when a user is or is not logged in. In php ! means IS NOT as in !=, so here we go with your code

    <?php
    if ( !is_user_logged_in() ) { /* if the user != logged in */
    echo "<a href='http://www.disqusnow.co.uk/register-2/'>Register</a>";  /* echo the link*/
    } else { /* else if user is logged in */
    echo "Welcome Back";  
    } /* closing the if else statement */
    ?>
    
    
    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Dumb was me, did not read correctly your question (sorry) updated my answer 11 minutes ago, try that, I tested it locally and works fine :) the echo part you can change with your register code.

    like echo '<a href="#">LINK</a>';

    I put this on the side bar using the text widget.

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Sorry I think, I see what you are trying to do, you are using a default Text Widget from wp admin-> Appearance -> Widgets -> A text Widget with the code you posted?

    If so you can do the following

    /wp-content/themes/YOURTHEME/fucntions.php (create functions.php it if does not exist)

    than add this piece of code to the functions.php

    add_filter('widget_text','execute_php',100);
    function execute_php($html){
         if(strpos($html,"<"."?php")!==false){
              ob_start();
              eval("?".">".$html);
              $html=ob_get_contents();
              ob_end_clean();
         }
         return $html;
    }

    Now you can go to widgets and add a Text Widget to your sidebar and add a code like this

    <?php 
    if ( !is_user_logged_in() ) {
     echo "you are NOT logged in";
    } else {
     echo "you are logged in";
    }
    ?>
    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Can you post your exact code snippet as you put it, not loading probably means a typo in the code.

    You can get an example code from http://codex.wordpress.org/Function_Reference/is_user_logged_in , it pretty straight forward. Not much coding knowledge needed.

    And what @hnla means is that <font> tag has been deprecated, so use css something like

    <p style="color:#306EFF;">REGISTER HERE</p>

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Found the Problem for Media Upload wp 3.5.2 & 1.7.2, plugin Wp User Fronted v1.2.2 is causing the problem

    Avatar of mgrmn
    mgrmn
    Participant

    @mgrmn

    Also is this going to be removed in 1.8 ? Kinda nice of having it (working)

Viewing 25 replies - 1 through 25 (of 44 total)