Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does the $icon for the site go? #3

Open
jaycbrf4 opened this issue Dec 3, 2014 · 3 comments
Open

Where does the $icon for the site go? #3

jaycbrf4 opened this issue Dec 3, 2014 · 3 comments

Comments

@jaycbrf4
Copy link

jaycbrf4 commented Dec 3, 2014

// Display an icon for the site
$icon_output = '';
foreach( $icons as $icon ) {

                    if ( file_exists( $file . '/' . $icon ) ) {
                        $icon_output = sprintf( '<img src="%1$s/%2$s">', $siteroot, $icon );
                        break;
                    } // if ( file_exists( $file . '/' . $icon ) )

                } // foreach( $icons as $icon )
                echo $icon_output;

Where is this image placed?

@nrtyc4
Copy link

nrtyc4 commented Dec 15, 2014

The images should go in the LocalHomePage/img folder. That's where the only images are now in the project. From the config file, the icons from the img folder are created in an array of strings called $icons. Then in the index.php file, foreach( $icons as $icon ), then if it exists append it to the site root and display it on the site! I hope this helps

@jaycbrf4
Copy link
Author

Thanks for the reply but I figured it out-

The images should go in the LocalHomePage/img folder. That's where the
only images are now in the project. From the config file, the icons from
the img folder are created in an array of strings called $icons. Then in
the index.php file, foreach( $icons as $icon ), then if it exists append it
to the site root and display it on the site! I hope this helps


Reply to this email directly or view it on GitHub
#3 (comment).

@alisamii
Copy link

Hi...what do the icons need to be named so that they can be displayed?

I tried sitename-icon and sitename but neither seems to work.

It would be nice if, instead of the grey square to the left of the site name, the favicon of the site would be displayed. I am guessing that is the purpose of the icons...but I can't seem to get it to work.

Also, you have a Wordpress test that displays a wordpress logo to the right of the site name. Is there a way to extend that so it can detect different platforms (wordpress, joomla, drupal, laravel, etc.) and display the appropriate icon. And if it cannot determine the platform, at least display a generic technology icon (eg, php, html, etc)?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants