VanDragt.com

Commentary on Digital Media and Usability

Archive for the ‘webdevelopment’ tag

[Plugin: WP List Files] Fix: links don’t work when blog not installed in root of site

without comments

wp-list-filesWe’re using a customized version of WordPress as an electronic portfolio for students and we are using WP List Files to make documents available on the eportfolio. Unfortunately the WordPress support forums seem to delete my topic (possibly because it’s an older version) and the author is no longer supporting the plugin.

Due to time constraints, these plugins are no longer supported and will not be updated, ever! Unless you know what you’re doing, I strongly discourage using these on a production blog since they have not been tested since WordPress 2.5.

The plugin didn’t work in version 2.0.3 that we are using because the wp_enqueue_script function does not exist in this version  (the codex page does not say when this function was added). Anyway after manually adding the javascript to the theme’s head element the plugin almost worked fine – links didn’t take our folder structure into account.

works:
joeblogs.com</dir specified in post or page>

doesn’t work:
allblogs.com/blogs/joebloggs</dir specified in post of page>

Fix it by replacing line 231 to read:

$files .= ‘<li><a href=”‘.get_bloginfo(‘wpurl’).$item['link'].’”>’.$itemName.’</a>’.

The hyperlink created for the item didn’t have the complete blog url in it it assumed the blog was installed in the root of the domain. After this fix the plugin works fine.

Written by Sander

June 26th, 2009 at 9:24 am

Posted in Uncategorized

Tagged with , , , ,

Letter to Ministry of Sound

without comments

Dear sir/madam,
I am writing you to complain about the new ministry of sound website and the lack of data protection with regards to your users.

Earlier today I received an email notification about the new MoS website. The email also notified me that a new password was issued to use on the website. These are two characteristics of a phishing mail - in this case launching a new website and sending out new passwords, they could easily have been sent from a malicious source wanting me to login to their MoS-lookalike website and take my credit card details. You shouldn’t send out a new password unless someone requests it on your website, because email can be forged. You also sent out my password in plain text email rather than on a secure part of your website. Anyone can read it and login to my account and purchase orders.

Also to my surprise while investigating the source of the mail, several of the links point to a http://www.c-f-1.com/ domain (update: this domain name no longer exists!), the name doesn’t help to improve the trust in your email. To my astonishment the link led to a webpage with the html email, again with my password in plain sight. Have a look (link removed), I changed my password already. Let’s wait for Google to index it so that anyone can search for my account information. They already found other newsletters.

Finally, I used mosdownload.com to buy my mp3s online. This site no longer works as an error comes up when it tries to redirect, due to a configuration error. My order history is gone, most of my profile is gone.

I’m very disappointed with your lack of security and care for your customers and unfortunately have come to the conclusion that I won’t be using your service again, and I will recommend my friends and family to do the same, due to these trust issues.

Written by Sander

October 28th, 2008 at 11:07 am

Posted in Uncategorized

Tagged with , ,

Fixing Trac after upgrading VisualSVN

without comments

If you upgraded VisualSVN Server like I have today to 1.61 and have Trac installed as per VisualSvn+Trac then you’ll notice Trac stopped working.

To fix this, follow this part of the instructions:

Add following line at the top of file C:\Program Files\VisualSVN Server\httpd-wrapper.bat:

set PYTHONHOME=%~dp0\Trac\python

Update: Later updates to VisualSvn Server break Trac.

Written by Sander

October 22nd, 2008 at 3:01 pm

Posted in Uncategorized

Tagged with , , ,

TracFogbugzPlugin 0.9u-py2.5 Patch for Trac 0.11

without comments

If you use both VisualSvn + Trac (or another flavour of Subversion and Trac), and tried to integrate them with Fogbugz , you will have tried the TracFogbugzPlugin.

Trying to get this to work isn’t straightforward as it’s not compatible with Trac 0.11. You will come across the following error:

Traceback (most recent call last):
File “C:\Python25\Lib\site-packages\trac\web\api.py”, line 339, in
send_error
‘text/html’)
File “C:\Python25\Lib\site-packages\trac\web\chrome.py”, line 684, in
render_template
data = self.populate_data(req, data)
File “C:\Python25\Lib\site-packages\trac\web\chrome.py”, line 592, in
populate_data
d['chrome'].update(req.chrome)
File “C:\Python25\Lib\site-packages\trac\web\api.py”, line 168, in
__getattr__
value = self.callbacks[name](self)
File “C:\Python25\Lib\site-packages\trac\web\chrome.py”, line 460, in
prepare_request
for category, name, text in contributor.get_navigation_items(req):
File
“c:\Python25\lib\site-packages\tracfogbugzplugin-0.9u-py2.5.egg\fogbugz\fogb
ugz.py”, line 22, in get_navigation_items
yield ‘mainnav’, ‘fogbugz’, Markup(‘<a href=”%s”>FogBuz</a>’,
self.baseurl)
LookupError: unknown encoding: >/”>https://<<myurl>>/

To fix this line 22 needs changed, to read:

yield ‘mainnav’, ‘fogbugz’, Markup(‘<a href=”%s”>FogBuz</a>’%self.baseurl)

Or download the file below and use it as part of the installation instructions (if this is your first Python Egg you want to read about installing Trac plugins. ;)

Now it is loading but the plugin doesn’t seem to work, haha.

Download: Patched tracfogbugzplugin-09u-py25

Written by Sander

October 15th, 2008 at 11:59 am

Posted in Uncategorized

Tagged with

Passing and receiving multiple values to VbScript functions

without comments

Maintaining code can be a real pain in backside. Especially when you’re using shared code, almost always at a later date you will want to make the code more versatile to accommodate a scenario you hadn’t thought of before.

I’ve had experience this in an ASP / VbScript environment, and therefore I’m going to use the terminology of page and functions as opposed to files and classes:

  1. Rework the code and update all pages. This is obviously a bad idea.
  2. To extend inflexible code: Rename the function and create a wrapper in its place to access the function using default parameters that are compatible with your existing codebase.
  3. Create functions that are extendable.

To use optional parameters, pass them in an Array or dictionary object. This way you can add additional ones. The benefit that Arrays have over Dictionary objects is that they use less resources. This can be important if you are developing for a popular website.

Another advantage of using Arrays is that you’ll use less code calling the function. Using a dictionary object you’ll have to add each parameter separately, then pass the dictionary object as the parameter of the function.

On the other hand, code will be more legible using dictionary objects. Dictionary objects use  key value pairs to tell you that key A has a value B. You’ll not have to bother about the order of parameters, but you’ll have to know the keys of each function. It results in verbose, legible, resource intensive code.

Written by Sander

October 9th, 2008 at 11:14 am

Posted in Uncategorized

Tagged with

Rewarding feedback

without comments

Acquiring feedback on web projects can be harder than you’d think, especially when you’re working on internal projects that don’t get discussed on outside your organization. By making feedback a fun, easy and rewarding thing to do more people might be encouraged to help us and put in the effort.

I’m sure some of you are in a similar situation: you launch a project and silence follows. Trivial problems might emerge but a there’s no general response to the long hours you put in. That makes it much harder to evaluate the project and set a schedule for future developments.

To help with this we’ve created a UserVoice page. Let’s describe it as a digg-like FAQ. People are encouraged to leave a message, can vote on feedback they find important, and always have the full picture of what the development is focused on. Developers act on the consensus and theoretically will work on solving the most urgent issues.

Of course this model will work best when both users and developers care enough to communicate. So Uservoice is engineered to make it trivial to leave a message. It can be easily integrated into an existing site. Some functionality requires a user account, which is a stumbling block. But you can leave feedback without it, which is a bonus. Oh and it doesn’t integrate with any bug trackers which is a shame.

Will it work and will there be enough participation? Ask me again in 6 months time. I’m not sure how to make it any easier though.

Written by Sander

August 4th, 2008 at 8:27 am

Posted in Uncategorized

Tagged with , , ,

Youtube Dreamweaver CS3 Tips

without comments

Brian Wood presents an excellent Dreamweaver tips video on Youtube. Many people just use DW as a text-editor but it’s capable of a lot more even in code view. The following video might open your eyes:

Very nice.

Written by Sander

April 28th, 2008 at 12:38 pm

Posted in Uncategorized

Tagged with ,