We can render a block in PHP as we discussed previously.
Drupal – Render a Block in PHP Code
This time, we want to render a view display by using the views_embed_view(). Continue reading Drupal – Render a View in PHP Code
We can render a block in PHP as we discussed previously.
Drupal – Render a Block in PHP Code
This time, we want to render a view display by using the views_embed_view(). Continue reading Drupal – Render a View in PHP Code
You can render a block in PHP as follow.
...
$block = (object) module_invoke('<module>', 'block', 'view', "<block id>");
print theme('block', $block);
...
We can use the hook_views_pre_render to insert extra content before or after the view content.
custom.module Continue reading Drupal – Add more content to a specific view using hook_views_pre_render
I found a Javascript which is for adding bookmark to browser. Since Chrome and Safari do not support adding bookmark by Javascript, an alert box will be prompted and tell the user using Ctrl + D to add the bookmark instead. Continue reading Javascript – Add To Bookmark
In Drupal, we can determine the template files of the page which is going to be rendered. Add the following code in your template.php.
...
function <theme>_preprocess_page(&$vars) {
// Drupal 7
print_r($vars['theme_hook_suggestions']); exit();
// Drupal 6
print_r($vars['template_files']); exit();
}
...
Continue reading Drupal – Add page.tpl.php for different Content Type
If your website is marked as “This site may harm your computer” by Google, most likely your site is hacked. In that case, log in to Google Webmaster Tools and it will shows you which URLs are “infected”. This should help a lot to clean the malware.
So make sure you have configured Google Webmaster Tools for your live websites. Continue reading Google – How to fix “This site may harm your computer”
Sometimes, when u search in Google, you may notice that some websites are marked as “This site may harm your computer”. This indicates that that specific websites contains malware either intentionally or hacked. Google provides an service to check if your website contains malware. Continue reading Google Safe Browsing diagnostic page
To check your CS-Cart version, simply enter the following URL in browser.
Done =)
Reference: How to check which version I am using?
We have talked about the Views Custom Field module previously. If you have no idea what is it for, you can take a look @ Drupal – Custom PHP code for Views Field.
Sometimes we may need to get a full node using Views Custom Field. For example, i want to get the number of images of a node. Continue reading Drupal – Sharing data across fields in the same row with Views Custom Field
The Views Custom Field module makes Views highly customizable. You create a HTML markup or PHP code snippet as a field which could retrieve and manipulate any data from the database. Continue reading Drupal – Custom PHP code for Views Field