How to change polylang flag? - wordpress

I need different flag for languages.
It is possible to use your own images as flags. You have to use PNG or JPG files and name them with the WordPress locale. For example, en_GB.png. Then upload this file in the /wp-content/polylang/ directory (create the directory if it does not exist). Don’t use the /polylang/flags/ directory as your file would be removed when automatically updating the plugin.
Once the custom flag is uploaded, go in Languages > Settings > URL modifications module then click on save changes. Note that your custom flags are not used on admin side.
I did all of this but the language switcher have the same flags... I don't see how the plugin would recognize that if I place an en_GB.png file in its directory (Not the flags folder). Feels like they miss something important, how to assign the images to certain language...

I modify flags, with CSS using title attribute, example:
img[title="English"] {
width: 50px !important;
height: 30px !important;
}

You have to go ssh/ftp (or any other way) to add a folder under /wp-content.
Your structure will look like:
> uploads
> themes
> polylang (this is your new folder)
> plugins
> languages
> index.php
Then create a PNG (preferably) or JPEG image for your flag (16x16px dimensions are good enough) and name it accordingly. For example for English you have to name the file as en_US.png (you can find the codes inside your plugin for each language).
Upload your image under /wp-content/polylang directory and go to your WordPress administration panel under Languages > Settings > URL modifications (just open this and hit save).
Refresh your browser and get your results!

Yes. You can use PNG, JPG or even SVG files and name them with the WordPress locale. For example, en_US.png.
Upload these files in the /wp-content/polylang/ directory.
Note: You have to create the directory yourself. Don’t use the /polylang/flags/ directory as your files would be removed when automatically updating the plugin. Alternatively, it’s possible to store the files in the /polylang/ subdirectory of the theme or the child theme.
Once the custom flags are uploaded, go to Languages > Settings. Click on the “URL modifications” settings and then on Save Changes.

Related

What do i need and how do I start to adjust the css of a website with "encrypted" .gz files

I want to help a friend out with his website. I need to change some styling in the css but i do not have drupal experience. In the css folder i found a lot of .gz css files with (what looks to me) encrypted names.
If i want to start editing these css files. How do i start? If i google it, i can find some information about gzip, but i don't know what the most practical solution would be.
Thank you for your help. This is how the folder looks like:
EDIT 1:
I found the css map with normal css files:
But changing these files, doesn't change anything. When i go to the website and inspect the elements. The inspect shows me the name of the files you see in the picture above in my question:
I hope this information helps.
For front-end some theme is used. From admin menu go to "Appearance" to find out what theme is used.
Then that theme should be located at "sites/all/themes/theme_name"
Inside that folder there should be theme info file, called:
theme_name.info
That file is defining CSS/JSS files that are going to be added to all pages (for adding those file to specific pages there is other way), so there should be lines like:
stylesheets[all][] = css/reset.css
stylesheets[all][] = css/style.css
stylesheets[all][] = css/style_gd.css
So, there you can see what CSS files are included, add you own and so similar. Make sure to clear drupal's cache after changing this file.
So you can change some of the files listed there...or add your own and add it to theme info file.
If some kind of caching is turned on ("Configuration -> Development -> Performance" from admin menu) then multiple files can be merged into one, compressed and similar...

qTranslate-X messes theme CSS in WordPress

I just added the qTranslate plugin to my WordPress site, but now, when I switch to another language in the menu, the CSS colors from the menu and buttons return to default. (Only in the new languages)
http://www.gasolina.me
Further inspection on the elements shows me that the browser is looking for the css (selection.php) inside the /es/ or /fr/ directories, but since its not there, the colors revert to the default, from another CSS file.
All the other CSS are fine (downloaded from the correct location), its only selection.php
I tried manually adding the file in a NEW /es/ directory but it messes the home page and displays an error when I add that directory.
The file marked as "initiator" (in my browser inspector) for the CSS file is not calling the /es/ directory in the href link for the php CSS file. So I don't know where to fix the mistake. Since all the other CSS files that are called from that same file are not being looked for inside the language directory.
Any thoughts?
Ok, so the solution was to add the php extension to the qTranslate ignore links settings inside the advanced settings. So that php files don't get translated (or their address location, rather)

Managing Wordpress Theme

A Wordpress theme has following components:
theme.zip file
demo-content.xml
PSD.zip file (contains files such as icon-blog.psd, icon-home.psd, integrity-blog.psd, ... renew-home.psd)
Using WP Admin (WP Backend) I have managed to upload theme.zip file.
Using WP Importer I have managed to upload demo content.
However, what do I do with PSD files?
I would like to add that the current frontend looks very basic. And I assume PSD files serve to enrich frontend. But how do I use them? Where do I "import" them? How do I do it?
After taking a look at the comments, I have to say that if the tag exists, the answer should be answered here too.
Your .PSD is basically all the images that compose your theme in one editable file.
The extension of the file is meant to be opened with Photoshop and if you open it there, you should see the design of your theme ready to be cut and applied into HTML and CSS.
For Wordpress or your site it has no utility by itself, however, if you want to change some button, icon or related it's just a matter of open the editable, change it, save the image and replace it on the server.
Ex:
You bought a theme initially developed in English and you have a button which is an image that says "Register". Since it's not editable, there's no code change that can help you, so the only way you have is to open the .PSD, edit the button and save it again as image, replacing the old one.

Where is css file of my menu?I have joomla site

Can't style my menu css,i tried to change in master-ccda(my site www.blobus.on.kg)It helps for 5 minutes than changed back.Please help me to find place where i can change it.
You use a rocketheme/gantry template. Your website has compression/caching enabled for the css. This is enabled either by the template settings or another compression/caching system plugin. Therefore what you get as a final css file, is a dynamically generated compressed css file. Any edits you are doing on this file are getting lost, as soon as the system will generate a new final master.css file.
You need to disable these functions while you are building your website. Doing so will stop the compression of all the css files into one and you will see what rules and from which files your menu and other elements/sections of your website inherit their styles.
In addition keep in mind that it is best to avoid making changes on the core files of your template/extensions.
Gantry templates allow you to create a custom css file where you can put your own css overrides.
The custom css file need to be place inside the css folder of your template and usually needs to have a name of this convention: rt_templatename-custom.css.

How can I change the way my Drupal theme displays the front page

I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page.
My question is: how can I edit the theme's css so it changes the way that block of static content is displayed?
For reference, here's the link to the site (in portuguese, and with almost zero content for now).
I can't access your site at the moment, so I'm basing this on fairly limited information. But if the home page is static content, the views module might not be appropriate. It might be better to create a page (In the menu, go to: Create content > page), make a note of the page's url, and then change the default home page to that url (Administer > Site Configuration > Site information, 'Default front page' is at the bottom). Although I might be misunderstanding what you mean by 'static content'.
But however you're creating the front page, don't edit the css in the theme - it'll get overwritten next time you upgrade. Instead you need to create a sub-theme.
As an example, if you want to subtheme Garland, in drupal 6. You first need to setup a directory for your themes. Go to sites/all/ in your drupal installation, and create a subdirectory called themes if it doesn't already exist. Go into that directory, and create a directory for your subtheme, say mytheme (i.e. sites/all/themes/mytheme/). Then use your text editor to create a file called mytheme.info in that directory, with the contents:
name = My Theme
version = 0.1
core = 6.x
base theme = garland
stylesheets[all][] = mytheme.css
And then use your text editor to create a file called mytheme.css in that directory, and put the extra CSS in there.
For more information, there's the druapl documentation on .info files and style sheets. Although, you might want to buy a book, as the online documentation isn't great.
The main css file that drives your content is the styles.css file located in your currently selected theme. In your case that means that most of your site styling is driven by this file: /aroda/roda/themes/garland/style.css with basic coloring effects handled by this file:
/aroda/roda/files/color/garland-d3985506/style.css
You're currently using Garland, the default Drupal theme included with the core download, so for best practices you shouldn't edit the included style.css file directly. Instead, you should, as Daniel James said, create a subdirectory in /sites/all called "themes".
If you're using Drupal 6, I'd follow Daniel James directions from there. If you're using Drupal 5, I'd go ahead and copy the garland directory into the themes directory and rename it for something specific to your site (aroda_v1) so you would have something like /sites/all/themes/aroda_v1 which would contain styles.css. At that point, you can edit the styles.css file directly to make any changes you see fit. Hope that helps!
It looks like most of your CSS info is in some *.css files. There is also some inline Style info on the page. Your style for the static info comes from the in-line stuff. I am not sure how Drupal generates the page but the place to start looking is for any properties for "ultima-edicao". That is what the surrounding DIV is called.

Resources