Posts Tagged ‘form’

Fix Null error in WordPress comment reply with wordpress-threaded-comments plugin enabled

Friday, April 6th, 2012

I'm running WordPress for already 3 years or so now. Since some very long time. The first wordpress install, I can hardly remember but it something like wordpress 2.5 or wordpress 2.4

Since quite a long time my wordpress blog is powered by a number of plugins, which I regularly update, whenever new plugins pops up …
I haven't noticed most of the time problems during major WordPress platform updates or the update of the installed extensions. However, today while I tried to reply back to one of my blog comments, I've been shocked that, I couldn't.
Pointing at the the Comment Reply box and typing inside was impossible and a null message was stayed filled in the form:

To catch what was causing this weird misbehaving with the reply comments functionality, I grepped through my /var/www/blog/wp-content/plugins/* for the movecfm(null,0,1,null):

# cd /var/www/blog/wp-content/plugins
# grep -rli 'movecfm(null,0,1,null)' */*.php
wordpress-thread-comment/wp-thread-comment.php

I've taken the string movecfm(null,0,1,null) from the browser page source in in my Firefox by pressing – Ctrl+U).

Once I knew of the problem, I first tried commenting the occurances of the null fields in wp-thread-comment.php, but as there, were other troubles in commenting this and I was lazy to read the whole code, checked online if some other fellows experienced the same shitty null void javascript error and already someone pointed at a solution. In the few minutes search I was unable to find anyone who reported for this bug, but what I found is some user threads on wordpress.org mentioning since WordPress 2.7+ the wordpress-threaded-comments is obsolete and the functionality provided by the plugin is already provided by default in newer WPinstalls.

Hence in order to enable the threaded comments WordPress (embedded) reply functionality from within the wp-admin panel used:

Settings -> Discussions -> Enable Threaded (nested) comments (Tick)

Enable Nested Comments WordPress default wp comments enable reply functionality screenshot

You see there is also an option to define how many nested comments subcomments, can be placed per comment, the default was 5, but I thought 5 is a bit low so increased it to 10 comments reply possible per comment.

Finally, to prevent the default threaded comments to interfere with the WordPress Threaded Comments plugin, disabled the plugin through menus:

Plugins -> Active -> WordPress Thread Comments (Deactivate)

This solved the weird javascript null "bug" caused by wordpress-threaded-comments once and for all.
Hopefully onwards, my blog readers will not have issues with threaded Reply Comments.

What’s goin on recently

Sunday, June 15th, 2008

At Saturday I had my first driving license. The instructor let me drive on the road for Balchik. Happily the driving went smoothly of course I made a lot of mistakes which is pretty normal for a first time driving. In the afternoon we went out for a walk with Niki. We just went out when Vlado (Hellpain) called, he came back to Dobrich for a day, we met for a coffee after which we stayed for 2 hours in the central park. Today as usual I attended the liturgy at the orthodox Church. Today it’s a big Christian Orthodox holiday, it’s the day in which the Our Lord Jesus Christ send the Holy Spirit to the early Church fathers (the apostles). The apostles heard a great noise and they see the Holy Spirit descending from heaven in a form of burning tongues, each tongue coming above the head of each of the apostles and the rest of the first believers in our Lord and Saviour Jesus. I’m still in doubt should I decide to go or not to the Netherlands. I applied for a room there through http://vivare.nl yesterday. But still haven’t received a confirmation for approval and I haven’t send a deposit for a room. I made research about the Arnhem Business School (ABS) and talked and I’m talking with a friend who went to study in Holland the last year. In the afternoon I watched an old russian movie which is marked as a SCI-FI genre (Kin Dza Dza), I got the title from the top 20 in IMDB. Yeah I can say that the movie was pretty freaky :). Vladi did call me again and said one of the servers in the office had crashed I spoke with of my colleagues with a request to go to the office and restart the box but it seems the box isn’t booting. Tomorrow I’ll catch an early bus for Varna and went to the office to see what’s wrong with the machine (hope it’s not a serious hardware problem). That’s most of it. To be honest although God grants me a lot of his divine grace I still feel a bit of lost and pathless and struggle to fight my lack of faith, and bad habits. I’m praying everyday for a physical healing but I still haven’t completely recovered from my sickness. I have sinned badly in my past and I deserve to have that sickness but still I honestly I’m repenting day after day for my bad life in the past and the near present … Another think I should say is that a friend of mine has died I saw his obituary hanging on a tree 🙁 , His name was Alexander (Sashe) known among us by the nickname (Saketo), he was a drug addict and that killed him I hope he is with God know peace be upon him. END—–

My PHP/ MySQL Restaurant Reservation Form

Tuesday, December 14th, 2010

Two months ago, I’ve developed a contact reservation form in PHP. The form is really easily customizable and is straight forward to integrate.
I’ve developed the form for a small restaurant which was missing the feature on it’s joomla based website in order to be able for restaurant clients to reserve tables.

Here is how my restaurant reservation form looks like:

hip0's plain php restaurant reservation form

Later on I found there are plenty of possibilities to easily make a reservation form in Joomla but at that time I had no idea that custom contact forms can be prepared with Joomla, so I developed my own one from scratch in plain PHP and MySQL.

The form’s fields are in Dutch, because the form I’ve developed for a Dutch restaurant.
However changing the form text is really easy,to do so open the php file and modify it, according to your needs.
I decided to share here the reservation form in hope that it might be helpful to somebody out there.
The Reservation form is licensed under GPLv2 so you’re very welcome to distribute and modify it freely.

The form installation is described in the README file you will find bundled with the reservation form archive.

You can d Download my PHP restaurant reservation form here

Feedback on the form is very welcome!
 

How to fix php “Fatal error: Class ‘SimpleXMLElement’ not found” and “Fatal error: Class ‘JLoader’ not found” on FreeBSD

Tuesday, June 21st, 2011

One of the contact forms running on a FreeBSD server configured to work on top of Apache+MySQL suddenly stopped working.

The errors that appeared on the webpage during a page request to the form url was:

Fatal error: Class 'SimpleXMLElement' not found in /var/www/joomla/plugins/system/plugin_googlemap2_helper.php on line 2176 Fatal error: Class 'JLoader' not found in /var/www/joomla/plugins/libraries/loader.php on line 161

As you see in the output the website which was causing the issues was running a Joomla version 1.5.23 Stable configured with RSForm!ver 1.5.x (as a contact form solution) and Google Maps version 2.13b plugins.

The Google Map from Google Maps plugin and the RSform were configured to appear on one physical configured article in Joomla and seemed to work just until now. However yesterday suddenly the error messages:
Fatal error: Class ‘SimpleXMLElement’ not found
Fatal error: Class ‘JLoader’ not found

came out of nothing, it’s really strange as I don’t remember doing any changes to either Joomla or the PHP installation on this server.
There is one more guy who has access to the Joomla installation which I suspect might have changed something in the Joomla, but this scenario is not very likely.

Anyways as the problem was there I had to fix it up. Obviously as the error message Fatal error: Class ‘SimpleXMLElement’ not found reported the server php simplexml was missing!

Just to assure myself the php simplexml extension is not present on the server I used the classical method of setting up a php file with phpinfo(); in it to check all the installed php extensions on the server.

Finally to solve the issue I had to install the module from ports php5-simplexml , e.g.:

freebsd# cd /usr/ports/textproc/php5-simplexml
freebsd# make install clean

Afterwards to make the new settings take place I did restart of my Apache server:

freebsd# /usr/local/etc/rc.d/apache2 restart
Syntax OK
Stopping apache2.
Waiting for PIDS: 63883.
Performing sanity check on apache2 configuration:
Syntax OK
Starting apache2.

Now my Joomla contact form is back to normal 😉

If someone has any idea why this error occured without any php or server modifications, and how comes that all worked fine beforehand even though I did not have the simplexml module instlaled on the server o_O, I would be enormously greatful.

RafKill Raptor Free Software (Open Source) clone for GNU/Linux

Saturday, January 28th, 2012

I've earlier blogged on playing Apogee's Raptor Shadows of Death arcade on GNU / Linux with dosbox

All the old school raptor addicts will be interested to hear Kazzmir (Jon Rafkind) a free software devotee developer has created a small game resembling many aspects of the original Raptor arcade game.
The game is called Rafkill and is aimed to be a sort of Raptor like fork/clone.
Originally the game was also named Raptor like the DOS game, however in year 2006 it was changed to current Rafkill in order to avoid legal issues with Apogee's Raptor.

The game is not anymore in active development, the latest Rafkill release is from January 2007, anyhow even for the 2012 it is pretty entertaining. The sound and music are on a good level for a Linux / BSD shoot'em'up free software game . The graphics are not of a top quality and are too childish, but this is normal, since the game is just one man masterpiece.

Rafkill Level 1 Debian GNU/Linux

Rafkill is developed in C/C++ programming language, the game music engine it uses is called DUMB (Dynamic Universal Bibliotheque). By the way DUMB library is used for music engine in many Linux arcade games. DUMB allows the Linux game developer to develop his game and play a music files within different game levels in "tracked" formats like mod, s3m, xm etc.

The game is available in compiled form for almost all existent GNU/Linux distributions, as well as one can easily port it as it is open source.

To install Rafkill on Debian, Ubuntu, Xubuntu and Linux Mint en other Debian based distros

root@debian:~# apt-get install rafkill

Installing on Fedora and other rpm based is with yum

debian:~# apt-get install rafkill
...

Once rafkill is installed, in order to start it on Debian the only way is using the rafkill (/usr/bin/rafkill) command. It appears the deb package maintainer did not wrote a gnome launcher file like for example /usr/share/applications/rafkill.desktop
Just to explain for all the GNOME noobs, the .desktop files are a description file GNOME reads in order to understand where exactly to place certain application in the (Gnome Applications, Places, System …) menu panel.

Even though it miss the .desktop, it is launchable via Applications menu under the Debian section e.g. to open it from the GNOME menus you will have to navigate to:

Applications -> Debian -> Games -> Action -> Rafkill

This "shortcut" to launch the game is quite long and hard to remember thus it is handy to directly launch it via xterm:

hipo@debian:~$ rafkill

Rafkill raptor like native Linux game main menu screenshot Debian GNU / Linux Squeeze

or by pressing ALT+F2 and typing rafkill :

Rafkill Linux game gnome launcher screenshot

Rafkill Debian Linux Level 5 power weaponscreenshot

Starting the game I got some really ugly choppy music / sound issues.
My guess was the fizzling sounds were caused by some bug with the sound portions streamed through pulseaudio sound system.
To test if my presume is correct, stopped pulseaudio and launched rafkill once again:

hipo@debian:~$ pulseaudio -k
hipo@debian:~$ rafkill

This way the game was counting on ALSA to process sound en the sound was playing perfectly fine.

I solved this problem through small wrapper shell script. The script did kill pulseaudio before launching rafkill and that way solve gchoppy sound issues, once the game execution is over the script starts pulseaudio again in order to prevent all other applications working with pulseaudio.

Finally, I've placed the executable script in /usr/bin/rafkill :

Here is the script:

#!/bin/bash
pulseaudio --kill
/usr/games/rafkill
pulseaudio --start

You can download rafkill.wrapper.sh here
Or write in root terminal:

debian:~# cd /usr/bin
debian:/usr/bin:# wget https://www.pc-freak.net/bshscr/rafkill.wrapper.sh
debian:/usr/bin:# mv https://www.pc-freak.net/bshscr/rafkill.wrapper.sh rafkill
debian:/usr/bin:# chmod +x rafkill

Interesting in Ubuntu Linux, rafkill music is okay and I suppose the bug is also solved in newer Linux distributions based on Ubuntu. Probably the Debian Squeeze pulseaudio (0.9.21-4) package version has a bug or smth..

After the change the game music will be playing fine and the game experience is cooler. The game is hard to play. Its really nice the game has game Saves, so once you die you don't have to start from level 1.

Rafkill Load menu screenshot

  I've seen rafkill rolling around on freebsd.org ftps under the ubuntu packages pool, which means rafkill could probably be played easily on FreeBSD and other BSDs.

Enjoy the cool game 😉

Theophany (Jesus’s baptizm in Jordan) feast in Bulgarian Orthodox Church on 6th of January

Saturday, January 7th, 2012

Baptism of Christ Theophany Old Orthodox icon

On 6th of January in our Bulgarian Orthodox Church just like in the most Christian realm, we celebrate the great feast of Theophany / Epiphany (Baptizm of our Saviour Jesus Christ in Jordan).

What exactly we celebrate is the Baptizm of our Saviour Jesus Christ in Jordan by st. John the Baptist (John the Forerunner as we call him in the church). This day is very important for us as Christians and this is why the holy fathers in the church has ordered this feast to be among the 12 most important feasts in our Church, the so called (Lords feasts).

On Theophany's day it is a rule in orthodox Church that the Great Blessing of Water is performed. The Blessing of the water and the preceding holy water from the priests blessing is taken by Church layman and we bring a little of this water to our homes to bless through that our homes.

In our Church belief the Holy Water from the Theophany feast is considered the most powerful in spiritual sense holy water as this water is the same water with which our sinless Saviour and lamb (Son) of God Jesus Christ was baptized in Jordan.

The reason why we call the feast Theophany is because God in his essence of Holy Trinity appeared clearly to mankind for a first time in Human history. Our Holy Trinity (3 essence God in one indistructable and insaparatable God – one God as God said for himself in the beginning of writtings) has revealed himself in front of all the people gathered along John the Baptist in Jordan waiting to be baptized in his three essences:

1. God the Father spoke from heaven manifesting and testifying about Jesus Christ being his beloved and only son and saviour of mankdin
,br />2. God the Son (Jesus Christ), has physically appeared to receive the baptizm to fulfill all righteousness and (the old testemential prophecies) and to begin his 3 years mission on earth.

3. God Holy Spirit) has descended from heaven on Jesus Christ in a publicly observable form of a dove

Theophany's feast is called by some english speaking orthodox christians Epiphany, but this is a term less used in orthodox christendom and much more spread in Roman Catholic one.

The Gospel readings in the church tell of the Lord's baptism by John in the Jordan River. The epistle reading of the Divine Liturgy tells of the consequences of the Lord's appearing which is the divine epiphany.

After the end of the st. Basil the Great Holy Liturgy served, the Great Blessing of Water is performed by one or more priests (depending on the number of present priests). The meaning of the blessing of the waters meaning is to show that mankind and all of God's creation, were created to be blessed and filled with the sanctifying of God's presence.

A very local unique bulgarian tradition on this number is that if the great blessings of water is performed by a priest near a river or a sea shore the cross be thrown in the water in order to bless the waters. Pulling out the holy cross from the Sea Bulgarian local Tradition on Theophany feast

Then a number of brave man jump in and do a race swimming aiming to pull out the crucifixion of the water. It is believed that the one who could pull out the cross will get God's great blessings through the upcoming church year.A person who pulled out the cross on Theophany Bulgarian tradition

Let us pray trust and hope on God to also appear to us who seek him, and show us his Holy Trinity wholeness mercies just like he did himself to the people waiting for Baptizm from John the Baptist by the holy prayes of the Theotokos and his holy saints and all heavinly hosts. Amen