Skip to:
Content
Pages
Categories
Search
Top
Bottom

BPDEV-FLICKR now online with BPDEV-ADMIN-MENU and BPDEV-SIMPLEPIE


  • nicolagreco
    Participant

    @nicolagreco

    Hi guys,

    i’m too excited to announce that BPDEV-FLICKR is now online! While i was writing it i wrote also BPDEV-ADMIN-MENU that shows a menu in the dashboard and BPDEV-SIMPLEPIE, that loads simplepie.

    Here a post about the releases http://buddypressdev.org/announce/bpdev-flickr-admin-menu-and-simplepie-are-now-online/

    For impatient here the links to plugins homepage:

    buddypressdev.org/plugins/bpdev-flickr/ <– BPDEV-FLICKR

    buddypressdev.org/plugins/bpdev-admin-menu/ <–BPDEV-ADMIN-MENU

    buddypressdev.org/plugins/bpdev-simplepie/ <– BPDEV-SIMPLEPIE

    Wait tomorrow for BPDEV-YOUTUBE Plugin ;)

    All plugins were made by me (Nicola Greco) for BuddyPressDEV.org,

    for supports and trouble shoting here buddypressdev.org/forums

    thanks to all,

    Nicola

    BP Guru

Viewing 25 replies - 26 through 50 (of 50 total)
  • Lightbox not working on main profile….guess I better check if it is loading the js on that page or not. No other plugins.

    JS is not loading for me on the profile page at all. It is loading like such on the actual flickr page though:

    <!--BPDEV-FLICKR PLUGIN LOAD STYLE&CSS START-->
    <script type="text/javascript" src="/wp-content/mu-plugins/bpdev-flickr/js/prototype.js"></script>
    <script type="text/javascript" src="/wp-content/mu-plugins/bpdev-flickr/js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="/wp-content/mu-plugins/bpdev-flickr/js/lightbox.js"></script>
    <link rel="stylesheet" href="/wp-content/mu-plugins/bpdev-flickr/css/lightbox.css" type="text/css" media="screen" />
    <!--BPDEV-FLICKR PLUGIN LOAD STYLE&CSS STOP -->

    Trent


    nicolagreco
    Participant

    @nicolagreco

    watch if some other scripts are loading other js

    No plugins running other than BP on that install that I am testing this out on. Only JS loading is the standard WP one as well as BP stuff:

    /wp-includes/js/jquery/jquery.js?ver=1.2.6
    /wp-content/mu-plugins/bp-core/js/jquery/jquery.livequery.pack.js?ver=2.7
    /wp-content/mu-plugins/bp-core/js/widget-members.js?ver=2.7
    /wp-content/mu-plugins/bp-groups/js/widget-groups.js?ver=2.7
    /wp-content/mu-plugins/bp-core/js/general.js?ver=2.7

    Not sure why is works calling all these same scripts on flickr page and not on this one. In this case, it isn’t even putting the call onto the page. What is the add_action that puts it on the profile page anyways?

    Trent


    nicolagreco
    Participant

    @nicolagreco

    link me the page please, you’re really an exception!


    nicolagreco
    Participant

    @nicolagreco

    Trent it works for you :S

    Seriously it works for you? It works for me on http://onvertigobloggers.com/members/admin/flickr but not on the profile page I linked above. I don’t even get the call for the JS in the page source! !

    Great effort. Almost everything works great.

    For the life of me I cannot seem to display the tiny icon flickr_bullet.gif or the youtube icon on my pages – I modified the css to give it an absolute and relative path (I have BP in a subdirectory so I had to change the path) – nothing happens.


    nicolagreco
    Participant

    @nicolagreco

    @jmax change in the style.css the path of the bullets’ images in /wp-content/mu-plugins/bpdev-flickr/css/flickr_bullet

    That is what I did – changed the path to /mysubdir/wp-content/……… – doesnt work.


    gpo1
    Participant

    @gpo1

    @Trent, it works when you select flickr menu,but not in the user profile page !


    nicolagreco
    Participant

    @nicolagreco

    @jmax123 try to edit bpdev-flickr.php and search style..

    Here is the problem, when I look a the HTMl source rendered to the browser I see the path

    <link rel=”stylesheet” href=”/wp-content/mu-plugins/bpdev-flickr/css/style.css” type=”text/css” media=”screen” />

    <link rel=”stylesheet” href=”/wp-content/mu-plugins/bpdev-youtube/css/style.css” type=”text/css” media=”screen” />

    whereas the rest of the buddypress and wordpress links have the whole domain associated with them not just the /wp-content… they have http://domain.com/wp-content

    So, the function <script type=”text/javascript” src=”<?php echo $bp; ?>js/lightbox.js”></script>

    needs to really get the WP domain prepended?

    Here is what the problem is, the function should be and otehr fnctions also need the bloginfo(‘wpurl’) variable prepended

    function flickr_head_load_css() {

    global $bp; ?>

    <link rel=”stylesheet” href=”<?php echo bloginfo(‘wpurl’). $bp; ?>css/style.css” type=”text/css” media=”screen” />

    <? }

    Same goes for the js and other files

    And then to keep compatibity the style.css file can just have a relative path

    li a#my-flickr, li a#user-flickr {

    background: url(../images/flickr_bullet.gif) 89% 57% no-repeat;

    }

    instead of a hardcoded absolute path – that works.

    Now however the lightbox is broken – I will try to look into why

    So here are the updated youtube functions

    function youtube_head_load_js() {

    global $bp; ?>

    <!–BPDEV-YOUTUBE PLUGIN LOAD STYLE&CSS–>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/mootools.js”></script>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/swfobject.js”></script>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/videobox.js”></script>

    <!–BPDEV-YOUTUBE PLUGIN LOAD STYLE&CSS–>

    <? }

    function youtube_head_load_css() {

    global $bp; ?>

    <link rel=”stylesheet” href=”<?php echo bloginfo(‘wpurl’).$bp; ?>css/videobox.css” type=”text/css” media=”screen” />

    <link rel=”stylesheet” href=”<?php echo bloginfo(‘wpurl’).$bp; ?>css/style.css” type=”text/css” media=”screen” />

    <? }

    AND the flickr functions

    function flickr_head_load_js() {

    global $bp; ?>

    <!–BPDEV-FLICKR PLUGIN LOAD STYLE&CSS START–>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/prototype.js”></script>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/scriptaculous.js?load=effects,builder”></script>

    <script type=”text/javascript” src=”<?php echo bloginfo(‘wpurl’).$bp; ?>js/lightbox.js”></script>

    <!–BPDEV-FLICKR PLUGIN LOAD STYLE&CSS STOP –>

    <? }

    function flickr_head_load_css() {

    global $bp; ?>

    <link rel=”stylesheet” href=”<?php echo bloginfo(‘wpurl’).$bp; ?>css/lightbox.css” type=”text/css” media=”screen” />

    <link rel=”stylesheet” href=”<?php echo bloginfo(‘wpurl’). $bp; ?>css/style.css” type=”text/css” media=”screen” />

    <? }

    AND the youtube css

    li a#my-youtube, li a#user-youtube {

    background: url(../images/youtube_bullet.gif) 89% 57% no-repeat;

    }

    AND the flickr css

    li a#my-flickr, li a#user-flickr {

    background: url(../images/flickr_bullet.gif) 89% 57% no-repeat;

    }

    I just updated the post above – moved css lines to css func and js lines to js.

    Lightbox works but the close gif at the bottom does not work yet


    nicolagreco
    Participant

    @nicolagreco

    Don’t paste code on the forum please, you should edit this variable $bp at the start of the file

    Sorry – not sure how else I can tell what is wrong without pasting code.

    Is there an alternative way to communicate?

    I was just writing for you so you can make the changes to your current version.

    If you agree that this is a change that needs to be made, please do so.

    Thanks.


    gpo1
    Participant

    @gpo1

    nicola ,you should set-up a twitter.com account

    I mention it before, and Nicola will (I hope) use it in the next version, scripts and styles should be added using https://codex.wordpress.org/Function_Reference/wp_enqueue_script and https://codex.wordpress.org/Function_Reference/wp_enqueue_style

    That is cool – I knew they had a “wont break with the next version” convention. Nicola could we please follow the convention – that will ensure the longevity of your work.

    Thanks for all the hard work, sincerely appreciate it.

    What’s nice with WP/WPMU is that you don’t need to include the most popular javascript libraries with your plugin, they are already installed (scroll down a bit and you see the list: https://codex.wordpress.org/Function_Reference/wp_enqueue_script ), and using wp_enqueue_script you avoid conflicts.

    E.g.: BPDEV-FLICKR should/could do (not tested):

    function init_scripts() {
    global $bp;
    wp_enqueue_script('prototype');
    wp_enqueue_script('scriptaculous-builder');
    wp_enqueue_script('scriptaculous-effects');
    wp_enqueue_script('bpdev-lightbox', bloginfo('wpurl').$bp['flickr']['lightbox'] . 'js/lightbox.js' , array( 'prototype','scriptaculous-builder','scriptaculous-effects' ) );
    }
    add_action('init','init_scripts');

Viewing 25 replies - 26 through 50 (of 50 total)
  • The topic ‘BPDEV-FLICKR now online with BPDEV-ADMIN-MENU and BPDEV-SIMPLEPIE’ is closed to new replies.
Skip to toolbar