This forum is for assistance with theme development.

Help!! SVG and PNG solution needed!!!

In our quest to find a dependable technique to use SVG’s and PNG’s in our Drupal sites, we’ve experimented with the following approaches:



Our First Approach:

Upload SVG as file, and upload PNG as image. Use fallback javascript for image replacement

Experiment:
1. Since there is no way to upload an SVG as an image type by default in Drupal, we created a file upload of an SVG image in a content type, with a separate PNG image upload. Both SVG and PNG files with matching names (except extensions) were then added to the site’s default image directory.

2. To display the SVG (for SVG compatible browsers), we created a corresponding node.tpl.php file and printed out the file in an image tag.

3. As a fallback, to display the PNG (for browsers that aren’t SVG compatible), we used a javascript solution, SVGeezy (http://benhowdle.im/svgeezy/), which displayed the PNG image version.

The Good Results:
• SVG files displayed fine in compatible browsers
• PNG files displayed fine in non-compatible browsers

The Bad Results:
• The browser has to access the database multiple times to retrieve a lot of SVG files. Assuming this slows down page load time.
• No known way to have PNG images not download when a page is loaded (if not needed). Assuming this slows down page load time.

How to design theme for internal pages?

Hi guys,
I am developing a theme for where I work and I need to have a very special page theme for internal pages. for example when user click on an article he/she will be redirected to the article page which has specific appearance. I know how to design a theme for front_page but I don't know how to do this for internal page of articles or any other content types.
tnx

Omega theme, change the menu color using CSS

I've created my blank Omega subtheme, and have begun messing around in global.css.

I've managed to be able to customize every attribute of every area of my theme using "inspect element,' the Admin Appearance tab (for regions, etc.), and good ole Google, but for the life of me I haven't figured out how to modify text and link color using CSS.

No way to get to the admin.

I've just started working with Drupal and I've managed to lock myself out of the admin. There is no way to get to the user login page or admin page. I've tried ?q=user ?q=admin ?q=user/login and several other variations along with the clean-url versions. All it does is reload the index. How do I fix this without going into mysql and changing the theme? How to I create a theme that lets you login?

Notice: Undefined variable: base_url in eval()

I have created a new theme by just copying Bartic and made necessary changes. However at front page i am getting below error:-

Notice: Undefined variable: base_url in eval() (line 17 of C:\wamp\www\drupal717\modules\php\php.module(80) : eval()'d code).
Notice: Undefined variable: base_url in eval() (line 22 of C:\wamp\www\drupal717\modules\php\php.module(80) : eval()'d code).
Notice: Undefined variable: base_url in eval() (line 27 of C:\wamp\www\drupal717\modules\php\php.module(80) : eval()'d code).
........
........
........

How do I enable users to have a browse button (by clicking on the image icon)so that they can upload a picture.

I added a user to my website and I gave him the permission to use blocks. I activated wysiwyg and TinyMCE so that he can add also images.

But he has a problem, when he clicks on the icon to add an image then it opens a window where u can add the image url, image description,... but there is no browse button so that u can upload a picture.

thank in advance!

Pages

Subscribe with RSS Subscribe to RSS - Theme development