tag:blogger.com,1999:blog-68104385785520487412024-03-13T16:53:34.849+05:30Venkat Adapa's Tech BlogVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.comBlogger182125tag:blogger.com,1999:blog-6810438578552048741.post-62585569636412153462022-06-01T00:31:00.002+05:302022-06-01T00:35:31.947+05:30How to configure CORS in Drupal 9 To grant access from 3rd party sites to your site resources let's say your Restful services , You need to configure it first, Otherwise as a security concern, Browser itself deny the request.How to enable access from myjsapp.com to Drupal 8/9 site.Goto sites/default folderCopy the default.services.yml file, and place in the same folder and rename it services.ymlNow find the cors.configVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-16232326536162918492022-05-04T20:19:00.004+05:302022-05-04T20:23:22.067+05:30How to generate a link which adds product to the cart in WordpressIn Wordpress, We can have links to add product to the cart which is required sometimes especially when sending campaign links to promote product or course and providing buy product option.Ex: https://www.yourwpdomain.com/?add-to-cart=3016&quantity=1 Will add product with id 25 to the cart with qty 1 https://www.yourwpdomain.com/?add-to-cart=3016&Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-498599768775539812017-03-07T15:51:00.000+05:302020-12-02T15:55:31.051+05:30Headless Drupal
Drupal is the world’s popular and widely used CMS
framework. Drupal back-end system is very strong and can be used for managing
any type of content like text, categories, media, geospatial, etc.
The term Headless Drupal means, use Drupal as a backend
system and Rest server, so that content operations (read, update, delete) can
be done from another language or tool. Drupal 8 comes with Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-37206191611701198142017-02-07T13:37:00.004+05:302020-12-02T02:31:42.502+05:30Drupal 8 Multisite CreationGoto /d8codebase/sites/sites.php file.
Add below array
$sites = array(
'site1.com'
=> 'site1', // Domain name => Folder name. 'site2.com' => 'site2',);Then create site1, site2 folders inside /d8codebase/sites/ folder
Like in D7, Inside site1 and site2 folders create separate settings.php and add the database and other configurations specific the site.
Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-85005965310135481252015-05-29T19:14:00.003+05:302015-05-29T19:19:51.502+05:30Solution for Slow queries issue in Drupal 6
If you are running drupal 6 application with multi lingual setup especially using i18n module, Then there might be having mysql database issues like slow queries means some queries might take more than 30 minutes to execute and in turn shuts down the mysql server.
If anyone experiencing the same issue, then apply below patch to fix the issue.
https://www.drupal.org/files/issues/337089-26Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com1tag:blogger.com,1999:blog-6810438578552048741.post-7352422970473093962015-04-14T16:06:00.003+05:302015-04-14T16:06:49.719+05:30Best Bulletin Board (Discussion Forum Software)
I am glad to share the information that, I have used many forum softwares so far and found Mybb is the best among all with very decent features.
Some of the most useful features are
Private Messaging : Send and Receive private messages
Calendars and Events : Manage multiple calendars and conduct events
Email notifications : When new thread opened, send automatic email notification to all Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-53337680263642432492015-04-10T19:52:00.001+05:302015-04-10T19:52:44.423+05:30Reasons to love Drupal8
Drupal is world's leading open source content management system. Drupal8 is the latest release on it's journey. Already beta version got released with modern object oriented programming approach.
Below are the list of significant features added in the Drupal8 core.
Mobile in its DNA : Deploy content once and watch it in any device the way you want.
New Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-91205030894366941152013-12-17T23:12:00.000+05:302013-12-17T23:12:01.150+05:30Drush Installation from Pear Channel
Below is the easy way of installing drush in linux systems/servers.
#Add drush channel to pear list
pear channel-discover pear.drush.org
#Check whether is it added or not
pear remote-list -c drush
#Then run install command as below
pear install drush/drush
pear install drush/package_name (or version_name)
Now enjoy running Drush commands straight away without any Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-59242035557723286442011-05-09T21:34:00.000+05:302011-05-09T21:34:57.125+05:30My skype icon didn't visible
In ubuntu sometimes, the skype icon hide from panel, when you select the option remove from panel, then the solution is:
right click on an empty area in your notification area (top-right bar by
the clock) and select "Add to Panel" now scroll down and find
"Notification area" then OK.
you should be able to see the green >>running<< skype
instance along with all non running Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-72997168472921649772011-04-06T14:41:00.000+05:302011-04-06T14:41:10.358+05:30Enable clean urls in Ubuntu
Ensure that mod_rewrite is enabled for Apache 2: % sudo a2enmod rewrite
Edit Apache 2 configuration to allow Drupal's .htaccess file to be used. In file /etc/apache2/sites-enabled/000-default, inside the tag Directory /var/www/, replace the lineAllowOverride nonewithAllowOverride All
Restart Apache 2:% sudo /etc/init.d/apache2 restart
kratib's blog
Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-76319733110493388342011-04-05T12:29:00.000+05:302011-04-05T12:32:12.469+05:30Drush installation and configuration steps
Drush configuration steps
1. Download Drush module from http://drupal.org/project/drush and place drush folder into your home directory. E.g: '/home/drush/'
2. In command line, execute following this statement.
PATH="/home/venkat/drush:$PATH" for temporary
3. Add this line PATH=/home/drush:"${PATH}" in /home/venkat/.bashrc file
4. Execute following command in Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-61272438575807991142011-01-11T12:01:00.001+05:302011-01-11T12:01:37.875+05:30Database Fundamentals - Free Ebookhttp://www.ibm.com/developerworks/wikis/display/db2oncampus/FREE+ebook+-+Database+fundamentalsVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-14225039779664484362011-01-10T20:18:00.000+05:302011-01-10T20:44:24.078+05:30Drupal 7 Release Party @ Hyderabad - Sponsored by Azri
This release party was celebrated by Drupal Hyderabad team and sponsored by Azri soultions
see more photos at At my facebook album
Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-19803290852984757332011-01-06T23:43:00.001+05:302011-01-06T23:46:38.964+05:30HAPPY NEW YEARVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-16704265323016014272011-01-02T20:21:00.000+05:302011-01-02T20:21:10.487+05:30How to send images as email content but not as an attachment.Below is the process to send image as email content.
1. Open the image in internet explorer or google chrome browser or any other browser. Dont open in firefox. Also your image need to be in any live website (ex: flickr or photobucket etc..) coz you can't send from your computer.
2. Then right click on the image and select the option copy or copy_image
3. Then paste in your mail body. Thats Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-30299567821648949782010-12-20T13:34:00.001+05:302010-12-20T13:34:56.991+05:30Where should find the trash files in ubuntuThe deleted files can be found in the hidden directory ~/.local/share/TrashVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-16058208081795687042010-09-09T15:24:00.001+05:302010-09-09T15:24:23.154+05:30Set ubuntu screen resolutionhttp://techblissonline.com/ubuntu-804-set-default-resolution-1024-768-virtual-pc-2007/Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-81060900123710577322010-09-03T09:36:00.000+05:302010-09-03T09:36:29.365+05:30Problem with [[!CDATA ]]Sometimes when you load the xml file, you didn't get the data between the tags [[!CDATA ]]. This is the character data and you can't get with simplexml_load_file library. In that case use that function as below, so that it will escape the CDATA from url.
$xml = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA)Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-68149041496888686952010-08-27T09:42:00.000+05:302010-08-27T09:42:11.996+05:30Drupal Custom Module StructureThe module should place at sites/all/modules/custom
Ex: mymodule
-mymodule.info //contain module meta data
-mymodule.module //contain actual logic
-mymodule.js
images (folder)
mymodule.module
<?
function mymodule_init()
{
//load global variables in to funtion
global $base_url;
global $user;
//will load all module dependent js and css using drupal_add_js,css functions
Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-75084008057277278402010-08-19T12:29:00.001+05:302010-08-19T12:29:32.138+05:30Send mails from your domainYour hosting provided need to create one mail server for your domain then only mails sent from your domain name like from : mail@mysite.com, otherwise some default mail server details displayed in mails header information.
To check is mail server set for your domain then run below commands at dos prompt.
ping smtp.mysite.com
and/or
ping mail.mysite.comVenkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-7863923131716700852010-08-17T12:31:00.000+05:302010-08-17T12:31:23.558+05:30Display login/register form below the post content in DrupalHi there,
In drupal, When we enabled the comments for blog content type and only registered users can post the comments. If user not logged in then they will see Login or register to post contents at bottom of the post. These links were redirected to a next page to login/register but it is better to display below the post, For this use below code.
function mymodule_nodeapi(&$node, $op, $a3 = Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-58856475334852898862010-08-12T14:27:00.000+05:302010-08-12T14:27:45.052+05:30Rails number format helper functions1200.2345.round
o/p: 1200
1200.2345.round_with_precision(2)
o/p: 1200.23
Currency format in rails
number_to_currency is the helper method provided by rails action view helpers. The options were
:precision - Sets the level of precision (defaults to 2).
:unit - Sets the denomination of the currency (defaults to "$").
:separator - Sets the separator between the units (defaults to ".").
:Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com1tag:blogger.com,1999:blog-6810438578552048741.post-52306095655397337782010-08-11T17:27:00.000+05:302010-08-11T17:27:47.810+05:30about drupal teaserA "teaser" is essentially a snippet of text designed to tell the user the content of a post without reading the entire post. Since most writers have embraced the common journalistic style of explaining the nature of an article in the first paragraph, teasers work well for most articles.
Here's what happens:
1) A node contains an entire article.
2) Drupal's "teaser" function, "node_teaser," Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-41583956954230417842010-08-11T11:44:00.000+05:302010-08-11T11:44:09.035+05:30Cross domain data exchangeYou can use XML language to transfer large data from one domain to other. Suppose domain-x wants to send data from its database to domain-y. Then domain-x will generate xml file for the database and send it to the domain-y via post method for security purpose. Upon receipt of xml file from domain-x, the domain-y will store that xml file in one folder and create one new row in received_xml table, Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0tag:blogger.com,1999:blog-6810438578552048741.post-66746609969263408392010-08-11T10:00:00.000+05:302010-08-11T10:00:08.363+05:30Cron job commands to run shell script, ruby script and php scriptCron job commands to run different Scripts
Syntax:
Time to run - Command
[ Minute - Hour - Day - Month - Weekday ] - Command
Times pattern
* * * * * => Execute every minute
0 * * * * => Execute every Hour
0 0 * * * => Execute every mid-night
0 0 0 * * => Execute every Month
0 0 0 0 * => Execute every Weekday
*/5 * * * * => Execute every 2 minutes
0 */2 * * * => Execute two Hours
Venkat Adapahttp://www.blogger.com/profile/13205703689783831298noreply@blogger.com0