October 26, 20093 Comments

newstickerLet me clear first about what is Slick RSS

Slick RSS is a joomla module that Parse and Display RSS Feed News with DHTML Teaser Tooltip. For details pls visit this link.

ok , let me tell what I am going to do next. That module is great to show rss feed from another site and I want to use it as a news ticker and it can be named as rss news ticker. ok then let’s make it done.

I am going to use js library jQuery and it’s plugin BBCNewsTicker. Please download latest version of jquery and that plugin this the given link.

Now, install the module Slick RSS in your joomla site and publish in any module position. Now I am going to make little change in the module code so that it can be configured for newsticker.

open the file default.php from modules\mod_slick_rss\tmpl and check link near 39

<ul class="slick-rss-list<?php echo $params->get('moduleclass_sfx'); ?>" id="slick-rss-list< ?php echo $params->get('moduleclass_sfx'); ?>" style="margin-left:0px;padding-left:0px;">

here I am adding id to ul tag so that the jquery plugin can catch that and do newsticking :P

oh btw,$params->get(‘moduleclass_sfx’) that is the class sufix that u add to that module, it urgent to give module suffix here and don’t give same class sufix for another copy of same module in same page. In that the first module be working as newsticker as both more than one module’s ul tag is getting same id.

Next task is to add jquery and it’s plugin and do that newsticking… :D
I am putting them in index.php of the current active template. make folder named js in your current template folder if there is none and put the jquery file and it’s plugin in that folder . now put the these lines in your index.php template file

<script src="<?php echo $this->baseurl; ?>/templates/js/jquery-1.2.6.pack.js"></script>
<script src="<?php echo $this->baseurl; ?>/templates/js/newsticker.js"></script>
<script type="text/javascript">// < ![CDATA[
jQuery.noConflict();
jQuery(document).ready( function(){
var options = {newsList: "#slick-rss-list_rssnews", tickerRate: 80, loopDelay: 3000,	startDelay: 10, 		placeHolder1: "_"}

jQuery().newsTicker(options);
});
// ]]></script>

Look the above code I used the jquery file name jquery-1.2.6.pack.js and it’s plugin newsticker.js .So if u are using latest version of jquery or it’s news ticker plugin then put the file names carefull in the code…

another line check here

var options = {newsList: "#slick-rss-list_rssnews", tickerRate: 80, loopDelay: 3000,	startDelay: 10, 		placeHolder1: "_"}

here #slick-rss-list_rssnews # is jquery syntax to catch slick-rss-list_rssnews as id and _rssnews is the class suffix for the Slick RSS module that I put from admin panel in the module configuration. If you put any thing then the id will be like #slick-rss-list{class suffix here without 2nd bracket} in this format. I think you are clear.

Oh u may ask why I wrote that line jQuery.noConflict(); and jQuery in place of $ sign.. heh to avoid conflict with other js library. You can search jquery seach about this noConflict mode.

Another thing is put the above code in footer of yout index.php file so that the loading time of jquery and it’s plugin doesn’t make any problem for site loading. For first time before the site loaded completely(before the dom is ready) the rss feed will be shown as listed like

list1
list2
list2

so if u make the ul tag height as the the line height of list item from css then it will seems that before the dom ready first news is displayed. When the dom is ready jquery plugin will start to work :)

waiting for your feedback :P

wana see demo of my work ? ok check here .If this link doesn’t work in future then check main domain of that link as this is a demo site now :)

অক্টোবর ১৪, ২০০৯4 টি মন্তব্য

রাস্তার প্রচন্ড জ্যামে বসে থেকে থেকে আমার ভেতর একটা চরম অস্বস্থি জন্ম নেয়,
বিরক্তি আর অসস্থিরতার এক পর্যায়ে আমি ঘুমিয়ে পড়ি।।

চায়ের দোকানে প্রচন্ড ভীড়ে চা দিতে দেরি হলে আমার ভেতর অস্থিরতা তৈরি হয়।
কিছুক্ষন … না একটা নির্দিষ্ট সময় অপেক্ষা করার পর আমি বিরক্তি নিয়ে উঠে যাই।।
চায়ের দোকানী হেঁকে বলেন… বাজান চা খাবেন না ?

কাজের মাঝ খানে, যখন গভীর মনযোগ দিয়ে কাজ করছি, ধুম করে ইলেক্ট্রিসিটি চলে যায়…
ইউপিএসটা মাত্র এক মিনিট ব্যাকআপ দেয়। আমি বিরক্তি প্রকাশ করতে বলে উঠি, “ধ্যাৎ” !

মাঝরাতে যখন আইএসপির লোকজন গভীর ঘুমে আচ্ছন্ন,
আর আমাকে ভোদায় বানিয়ে ইন্টারনেটের লাইনটা অফ হয়ে যায়… আমি গরর ।।

চারিদিকে নিস্তব্ধতা… আমি এক মনে কাজ করে চলি সারা রাত… কিন্তু মাঝে মাঝেই প্রচন্ড
অসস্থি আর অস্থিরতা আমাকে ঘিরে ধরে… ইচ্ছা করে ছুটে বের হয়ে যায় রুম থেকে আর
আহ এক কাপ চা যদি পাওয়া যেত… ঠিক হল লাইফে মাঝ রাতে পলাশীর মোড়ে যেভাবে চা খেতাম :(

অপেক্ষা, উপেক্ষা কোনটাই আমার সহ্য হয়না।
আমি একজন ইমোশনাল-ক্রেজি নিজের রাজ্যে ভবঘুরে!
প্রতিদিন একটু অবসর পেলেই আমি আর দুঃখ মিলে রচনা করি দুঃখবিলাস… মু হা হা ।।

=================================
মানচুমাহারা, ১৪ই অক্টোবর, ২০০৯।

অক্টোবর ২, ২০০৯7 টি মন্তব্য

আমি ব্যক্তিগত ভাবে যা করি যখন জুমলার জন্য কোন নতুন টেমপ্লেট বানায় তখন ডিফল্ট টেমপ্লেট rhuk_milkyway কপি করে নতুন নাম দিয়ে অপ্রয়োজনীয় ছবি, সিএসএস কোড ইত্যাদি সব মুছে ফেলি। এরপর নিজের মতো করে কোড করি সব কিছু। একথা বলার কারণ এইটা যে আমরা যদি ডিফল্ট টেমপ্লেট ব্যবহার করি তাহলে একটা ফাইলে সামান্য কিছু কোড যুক্ত করেই পেজিনেশনের ডিজিটগুলো বাংলা করে ফেলতে পারি।

এখন দেখি কি করে করা যায়। যদি ভালো করে খেয়াল করেন তাহলে নিশ্চয় templates\rhuk_milkyway\html এই ডিরেক্টরীতে pagination.php নামে একটা ফাইল আছে। এই ফাইলটা প্রথমে utf-8 হিসাবে সংরক্ষণ(save) করুন। এরপর
ফাইলের একদম শেষে ?> এর আগে নিচের কোড কপি পেস্ট করুন। …continue reading জুমলার ডিফল্ট টেমপ্লেটে পেজিনেশনে ডিজিট কিভাবে বাংলা করবেন ?

সেপ্টেম্বর ১৯, ২০০৯মন্তব্য করুন

coverwcgদীর্ঘ বিরতি শেষে বের হলো ‘প্রযুক্তি কথন’ এর দ্বিতীয় সংখ্যা। এ সংখ্যার মূল বিষয় ‘পরিবেশ এবং জ্বালানী’। পাশাপাশি রয়েছে মেধাস্বত্ব, সফটওয়্যার পরিচিতি, সায়েন্স ফিকশন, ইন্টারনেট এবং কম্পিউটিং এর বিভিন্ন কলাকৌশল নিয়ে লেখা। ৯০ পৃষ্টার এই ই-সাময়িকীটির সাইজ মাত্র ১.২৩ মেগাবাইট।

আমাদের প্রযুক্তি ফোরামে দেখুন এখানে
যারা প্রযুক্তি কথন এর প্রথম সাময়িকীর খবর জানেন না তারা এই লিঙ্ক দেখতে পারেন
ডাউনলোডঃ
প্রযুক্তি কথন দ্বিতীয় সংখ্যা
উপরের লিঙ্কে সমস্যা হলে নিচের লিঙ্কগুলো ব্যবহার করুনঃ
একঃ লিঙ্ক১
দুইঃ লিঙ্ক২

ই-সাময়িকীটি সম্পর্কে সকলের গঠনমূলক মতামত কাম্য।
আমাদের প্রযুক্তি টিমের পক্ষ থেকে সবাইকে ধন্যবাদ।

সেপ্টেম্বর ১৭, ২০০৯১টি মন্তব্য

যারা এই সিরিজের আগের দুইটা পোস্ট পড়েননি তাদের জন্যঃ
ওয়ার্ড প্রেস টিপ্স-১(আমার ব্যক্তিগত ব্লগে)
ওয়ার্ড প্রেস টিপ্স-২(আমার ব্যক্তিগত ব্লগে)

ওকে তাহলে আজকের টিপ্স শুরু করা যাক। এর আগে লিখেছিলাম কিভাবে ওয়ার্ডপ্রেস কাস্টম পেজ তৈরি করা যায় যা ছিলো কাস্টম টেমপ্লেট ব্যবহার করে। কিন্তু একত্রে যা হয় পাতাটা ওয়ার্ড প্রেসের ডাটাবেজ থেকে আসে, মানে পাতার কন্টেন্ট। কিন্তু যদি এমন চাই যে একটা স্ট্যাটিক পাতা হবে কিন্তু ওয়ার্ড প্রেসের ভেতরে থেকে এবং ঐ পাতায় ওয়ার্ড প্রেসের যাবতীয় টেমপ্লেট ট্যাগ ব্যবহার করা যাবে। ধরুন আপনি ওয়ার্ড প্রেস ইনস্টলেশনের রুট ডিরেক্টরীতে একটা ফোল্ডার বানালেন যার নাম myfolder. তাহলে এই ডিরেক্টরীর লিঙ্ক হবে http://yoursite.com/myfolder দেখুন এটা কিন্তু ওয়ার্ড প্রেসের ফোল্ডার নয়।
এখন এই ফোল্ডারে একটা php ফাইলে তৈরি করুন। ধরুন myfile.php।
ফাইলের শুরুতেই লিখুন এই রকমঃ

< ?php
	define('WP_USE_THEMES', false);
	require( dirname(__FILE__) .'/../wp-blog-header.php');
?>

যদি myfile.php একদম রুটে রাখেন তাহলে

< ?php
	define('WP_USE_THEMES', false);
	require( dirname(__FILE__) .'/wp-blog-header.php');
?>

…continue reading ওয়ার্ড প্রেস টিপ্স-৩

September 7, 20091 Comment

In phpxperts yahoo group there was a thread about how to submit a form in a iframe outside the iframe I mean from parent window. I replied my idea using js but the iframe should be in same domain. The js code is like

window.top.myframename.document.myformname.submit();

let me give u whole code. make a new file named frame.html and write the bellow code in that file

<form id="myformid" name="myformname" method="post" action="" target="_self" onSubmit="">
	Name: <input type="text" size="20" name="name" value="" id="namefield" />
</form>

and open a new file again and save in same dir with name index.html and write the bellow code in it

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Iframe form submit from outside</title>
</head>

<body>

<div id="infodivid"></div>
<iframe src ="frame.html" width="auto" height="40px" frameborder="0" id="myframeid" name="myframename">
</iframe>
<p><input onClick="submitiframeform(); return false;" type="button" name="submit" value="Submit" /></p>
<script type="text/javascript">

function submitiframeform(){
	window.top.myframename.document.myformname.submit();
}
</script>
</body>
</html>

now open the index.html in browser and click the submit button and see the form is getting submitted. I think If you just check the code then I don’t need to explain ‘what is why’.

thanks

সেপ্টেম্বর ৬, ২০০৯3 টি মন্তব্য

গতকাল ওয়ার্ড প্রেস নিয়ে লিখেছিলাম এই টপিকে এবং আমার ব্লগে এখানে। আজকে আবার নতুন কিছু নিয়ে লিখবো ,সাথে সাথে গতকালের ধারবাহিকতা চলবে। আমরা এই সিরিজের মূল উদ্দেশ্য ওয়ার্ড প্রেসের নরমাল ইউজার থেকে শুরু করা ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপার সবার জন্য আমার জানা ট্রিক্স ও তথ্যগুলো শেয়ার করাঃ
তিনঃ ‘থীমে সাব থীম ফাইল যুক্ত করা’

আগের দিন বলেছিলাম কিভাবে নতুন হেডার ফাইল যুক্ত করা যায়। চাইলে নিচের মতো করেও আমরা নতুন ফাইল থীমের যে কোন জায়গায় যুক্ত করতে পারি। কারণ একই ফাইলে অনেক কিছু লিখলে ট্রাক রাখা সমস্যা হয়।

< ?php include (TEMPLATEPATH . '/yourfilename.php'); ?>

yourfilename.php নামের ফাইলটি আপনার বর্তমান এক্টিভ বা যে থীম নিয়ে কাজ করছেন তার ভেতর রাখুন। আর অন্য থীম ফাইলের যেখানে দরকার সেখানে ব্যবহার করুন। TEMPLATEPATH আপনার বর্তমান থীমের ডিরেক্টরী। প্রশ্ন করতে পারেন এমন ঝামেলা কেন করবো বা এটার সুবিধা কি তাই তো ? হুম… ওয়ার্ড প্রেস দিয়েই আপনি চাইলে জুমলার মতো সাইটে বানিয়ে ফেলতে পারেন। জুমলাতে আমরা মডুল প্লেস হিসাবে যা বলে থাকি ওয়ার্ড প্রেসে তাকে বলা হয় সাইডবার(sidebar) আর মডুল গুলোকে ওয়ার্ড প্রেসের ভাষায়(বলা যেতে পারে) উইজেস(widget). আপনি চাইলে ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার ব্যবহার করতে পারেন তবে আপনার থীমে সেই সাপোর্ট থাকতে হবে। এই বিষয়টা নিয়ে পরের পোস্টে লিখি তাহলে।

চারঃ ‘ওয়ার্ড প্রেসে যত ইচ্ছা সাইড বার যুক্ত করা’

প্রথমেই বলে রাখি নতুন কিছু জানার আগ্রহ না থাকলে বা এক্সপেরিমেন্ট করার ইচ্ছা না থাকলে এখনই মানে মানে কেটে পড়তে পারেন না হলে পরে পস্তাবেন। :ttt:

‘তিন’ নং টিপ্সের কিছু বলা দরকার। ওয়ার্ডপ্রেসে আমরা নিচের কোড টুকু দিয়ে সাইডবার ফাইলটি লোড করি।

< ?php get_sidebar(); ?>

এটা যা করে তা হলো থীমের ভেতর sidebar.php ফাইলটা include করে। এখন যদি আপনার বিশেষ পাতায় বিশেষ কোড লেখা সাইড বার দরকার হয় তাহলে কি করবেন সেটা যদি এখনও না ভেবে থাকেন তাহলে আপনার উপর আমি এখনি কিন্তু খেপে গেছি। >:D< হ্যাঁ সেই আগের ট্রিক্স এখন যে সাইড বার ফাইলটা আছে সেটা কপি করে নতুন ফাইলে হিসাবে সেইভ করুন আর নাম দিন আগের সেই ফরম্যাটে যেমন sidebar-mycustomsidebar.php আর এই ফাইলে নিজের ইচ্ছা মতো পরিবর্তন করুন। আর এটা লোড করুন এই ভাবে

<?php get_sidebar('mycustomsidebar'); ?>

। মজা ?

…continue reading ওয়ার্ড প্রেস টিপ্স২

সেপ্টেম্বর ৫, ২০০৯11 টি মন্তব্য

“ওয়ার্ড প্রেস টিপ্স” এ ধারাবাহিক ভাবে ওয়ার্ড প্রেস বিষয়ক ছোট ছোট তথ্য দেওয়ার চেস্টা করবো।
নোটঃ কিছু কিছু টিপ্স এডভান্সড লেভেলের হতে পারে যা প্রফেশনাল ওয়ার্ড প্রেস বেসড ওয়েব ডেভেলপারদের জন্য কাজে দিবে আশা করি।

একঃ কাস্টম হেডার ফাইল বা header.php ফাইল কোন পাতায় যুক্ত করাঃ
সাধারণত আমরা এমন ভাবে থীম বানায় যে সাইট যেন হেডার, বডি, ফুটার এই ভাবে থাকে। আর এই চিন্তা থেকেই ওয়ার্ড প্রেস থীম এর কোর ফাইল হিসাবে header.php , footer.php ফাইল দুইটা থাকে। আর header.php ফাইল যুক্ত করার জন্য index.php, category.php ইত্যাদি ফাইলে আমরা ওয়ার্ড প্রেসের একটা টেমপ্লেট ফাংশন লিখিঃ

< ?php get_header(); ?>

যা header.php ফাইলটা লোড করে
এবং একই ভাবে footer.php ফাইলে যুক্ত করার জন্য লিখি এই রকমঃ …continue reading ওয়ার্ড প্রেস টিপ্স-১

September 2, 20091 Comment

3Ok let me at first tell why this post ?
I have a wp plugin named wptinybn which enables users to write in unicode bangla for different types of bengali keyboard in wp visual editor which is based on tinymce. Actually my wp plugin is based on my tinymce plugin tinybn. That means besides the wptinybn the tinybn plugin is a standalone tinymce plugin. So it should work with everywhere with tinymce. ok.. I am 25% done :)

There is another wp plugin named TinyMCEComments which enables wp users to write comments through tinymce editor. I am 50% done. Cool na ?

One of my reader asked me how to add the tinybn support to TinyMCEComments. I just check that plugin’s code and I have that plugin installed in my own blog too though not enabled! Yes my answer is yes … that means it’s possible. It can be done in different ways. As a quick thinking I am giving a poor or faster (whatever u think) way to do that. I am 75% done… wait a bit man.

Download the wptinybn and TinyMCEComments plugin and install them. (if u want not to install wptinybn to do that then it’s ok, I mean no dependency). Check wptinybn(unzip first!) folder and you should find a folder in it named “banglafkb”.Copy this and paste in wp-includes/js/tinymce/plugins folders in your blog wp installation. Done ? ok now …

hmm now you have to be more brave to edit the TinyMCEComments plugin… not much in deed. Open file tinyMCEComments.php and find the word “pls”. Stop to it’s first occurance the word will be like $pls and it’s a array and here parts of code is like

$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen');

now place // before this line and it will be like bellow

//$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen');

we just kept the old code .
now in new line put this bellow code

$pls = array('separator','bold','italic','underline','strikethrough','justifyleft','justifycenter','justifyright','justifyfull','bullist','numlist','outdent','indent','cut','copy','paste','undo','redo','link','unlink','cleanup','help','code','hr','removeformat','sub','sup','forecolor','backcolor','charmap','visualaid','blockquote','spellchecker','fullscreen','banglafkb');

If you check the above code what I have added new here ? just that ,’banglafkb’

I am 90% done. Now to to your admin panel activate tinymcecomments plugin then from menu Settings go to it’s(that plugin’s) setting page and check (if you done above copy pase and code editing) ‘banglafkb’ is in the button list and in the available plugin list. Just click both banglafkb to add from button list and plugin list. For button list click seperator before banglafkb that will be make a | seperator in editor. Now save this new option and check your comment form.

Angry one me ? You have done every thing properly but nothing new in the editor and u don’t see any change in the preview editor int the plugin options page. Don’t worry. The plugin keeps the setting in cache for 10 days. So to get the changes within one sec just open the tinyMCEComments.php file and pls check from top few liens code

there is a line like
$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
make this line comment I mean like
//$mcecomment_expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
and now put a new line bellow it like
$mcecomment_expiresOffset = 1; // Cache for 1 sec in browser cache

now save this file and check the option’s page’s preview editor.

I think I am 100% done now. mu ha ha.

Oh I forgot to say currently I am working on a joomla plugin to make the dates in bangla for front end for articles, actually it will work with com_content …hope to release this on the eid-durga puja vacation.

Again here is some screenshot(one is above) of this post’s summary.MCEComments Options ‹ Let’s start again… — WordPress_1251930556673MCEComments Options ‹ Let’s start again… — WordPress_1251930589424MCEComments Options ‹ Let’s start again… — WordPress_1251930628482

August 8, 20094 Comments

Dear Friends,

I know there is no update on tinybn for many days and it has so many bugs but I am not gone yet ! heh heh. I think who are very familiar with joomla and it’s content editor tinymce, are also familiar with jce(joomla content editor), a joomla conent editor based on tinymce with lots of feature. You can get jce here. Please check their donwload section to download the jce component and jce plugin/mambot(editor).

hmm, please don’t get sleep … I just made a plugin for jce to use my tinybn plugin directly in jce. No manuall install needed , I mean editing files to work with default tinymce.
So , here is the download file of tinybn for jce.

Download

  Tinybn JCE Editor (12.1 KiB, 838 hits)


How to install

1. Install jce component (that will help you to modify or control jce editor and install new plugin and much more)
2. Install jce plugin
3. Now install tinybn plugin for jce. Go to Administrator-> Components-> JCE Administrations-> Install (see screenshot bellow)
4. Now browser the downloaded zip file and install it.

tinybnjce1

that’s it.
Install finish :) . Ok now go to article manager and try to open/write any new article. I think you are intelligent enough to make your editor default to jce or even disabled tinymce from plugins. If jce is your current editor and you have install the tinybn for jce according to instruction then you should see like bellow. Select keyboard and type in diff bengali layout.

tinybnjce2

mu ha ha…waiting for your feedback.

feedback