HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

SymbolEdit - Broken Image Links and Administration

phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

Great plugin, already use it for my community. Donation will follow. :)

@peregrine: I found to issues that can be adressed as bugs i think.

1.) People who didn't choose a symbol-image have a broken image link in their profile, what would create in big communities thousends of broken links, which Search engines don't like normally.

2.) If a admin looks onto a profile of another user, Symbol-Edit doesn't appear in the settings panel. It would be cool if admins could help users in this case and interact with their settings like with any other.

Thanx for a great plugin, peregrine.

  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    All you need to do is add , if it is not there already , a pixel image , which is just a dot that can't be seen but acts as a placeholder .

    you need something like this to show the transparent pixel image when they do not have one.

    protected function DisplayPhoto($Sender) {
            $ImageSrc = '/applications/dashboard/design/images/pixel.png';
            preg_match('#\< img.+?src="([^"]*).+?\ >#s', $Sender->EventArguments['Discussion']->Body, $images);
            if ($images[1]) {
                $ImageSrc = $images[1];
            }
            echo Img($ImageSrc, array('class' => 'yourclassofImage'));
        }
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    Possibly you can add that here for this plugin. I am sure peregrine is having a good laugh but what the hell....

    if ($SymbolUser > 0) {
                echo Img("plugins/SymbolEdit/design/images/" . $symboldir . "/" . $SymbolUser . ".png", array('alt' => 'Symbol', 'title' => '', 'class' => "ProfilePhotoMedium"));
            }else
    {
    echo Img("applications/dashboard/design/images/pixel.png", array('alt' => 'placeholder', 'title' => '', 'class' => "ProfilePhotoMedium"));
     }
    
    
  • Options
    peregrineperegrine MVP
    edited July 2013

    @phreak said:
    Great plugin, already use it for my community. Donation will follow. :)

    peregrine: I found to issues that can be adressed as bugs i think.

    1.) People who didn't choose a symbol-image have a broken image link in their profile, what would create in big communities thousends of broken links, which Search engines don't like normally.

    Thanx for a great plugin, peregrine.

    I'll fixing number #1.

    not sure what you want: do you you want

    I'll post it when I finish.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited July 2013

    For #1

    Use either of these replacements, see which you like better @phreak

            public function UserInfoModule_OnBasicInfo_Handler($Sender) {
                $symboldir = C('Plugins.SymbolEdit.SymbolDir', 'CZodiac');
               //option 1  - show none selected for no symbol
               echo Wrap(T("My Symbol"), 'dt', array('class' => 'MySymbol'));
                if ($Sender->User->SymbolUser > 0) {
                echo Img("plugins/SymbolEdit/design/images/" . $symboldir . "/" . $Sender->User->SymbolUser . ".png", array('alt' => 'Symbol', 'title' => '', 'class' => "ProfilePhotoMedium"));
                } else {
                echo T("none selected");
              }
         }
    
    or this one
    
         public function UserInfoModule_OnBasicInfo_Handler($Sender) {
          $symboldir = C('Plugins.SymbolEdit.SymbolDir', 'CZodiac');
           //  option 2   - don't show anything if no symbol
               if ($Sender->User->SymbolUser > 0) {
              echo Wrap(T("My Symbol"), 'dt', array('class' => 'MySymbol'));
                echo Img("plugins/SymbolEdit/design/images/" . $symboldir . "/" . $Sender->User->SymbolUser . ".png", array('alt' => 'Symbol', 'title' => '', 'class' => "ProfilePhotoMedium"));
               } 
    }      
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited July 2013

    . edited

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited July 2013

    I've got the second part done for admin changes.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    magnifique !! oops wrong thread .... amazing p does it again !!

  • Options
    peregrineperegrine MVP
    edited July 2013

    @phreak

    @phreak said:
    Great plugin, already use it for my community. Donation will follow. :)

    Great, I will be checking for the donation :).

    peregrine: I found to issues that can be adressed as bugs i think.

    1.) People who didn't choose a symbol-image have a broken image link in their profile, what would create in big communities thousends of broken links, which Search engines don't like normally.

    Yes a but - fixed in uploaded version. Version 1.3

    2.) If a admin looks onto a profile of another user, Symbol-Edit doesn't appear in the settings panel. It would be cool if admins could help users in this case and interact with their settings like with any other.

    No not a bug. But I added the "Feature" since you were willing to donate for this plugin.

    Thanx for a great plugin, peregrine.

    glad you liked it. if you have different images, post a link or if you want to keep the link private pm me, I'd like to see it in action.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    I can just bow to your speed guys. I just woke up and the Plugin is fixed. :)

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    Donated today. To all the others "Donate every day!" ;)

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    peregrineperegrine MVP
    edited July 2013

    @phreak said:
    Donated today. To all the others "Donate every day!" ;)

    I like the way you styled it on your site. Nice job.

    Thanks much for the donation, I received it promptly, your use of the plugin and the donation made it all worth it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited July 2013

    @peregrine: I just came across the image link created in the source code and there is a small fix to made to make it standards compliant.

    The img renders like:
    [img style="border: 0px;" alt="image" src="http://www.babyforum.at/plugins/SymbolEdit/design/images/CZodiac/2.png"]

    It should be with a slash on the end:
    [img style="border: 0px;" alt="image" src="http://www.babyforum.at/plugins/SymbolEdit/design/images/CZodiac/2.png" /]

    Maybe this will be automatically taken by 2.1 but for 2.0.18.8 it's like this. Not sure if this is on behalf of the framework or the default.php.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options

    Maybe this will be automatically taken by 2.1 but for 2.0.18.8 it's like this. Not sure if this is on behalf of the framework or the default.php.

    I guess it depends on which standards require the / - but it is a vanilla function, not the plugin

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.