If you are getting the below errors with vBulletin after upgrading php.
Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\gtglass\a2hosting_forum\includes\init.php on line 383
Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\gtglass\a2hosting_forum\includes\class_core.php on line 2529
Unable to add cookies, header already sent.
File: E:\websites\dynamic\gtglass\a2hosting_forum\includes\init.php
Line: 49
To fix
Try replacing
error_reporting(E_ALL & ~E_NOTICE);
with
error_reporting(E_ALL & ~E_NOTICE & ~8192);
Then replace all occurances of '=&' with '='
Friday, January 27, 2012
vbulletin error after upgrading php "includes/init.php Line: 49"
Thursday, January 26, 2012
Joomla Virtuemart Product search plugin not finding products
The vmxsearch.plugin that comes with Virtuemart to integrate product search into the normal joomla website search works great once its configured. Some products may not show in the search results.
The main cause for this is if the product is out of stock. In my case I had a -2 in the stock amount for the products that were not showing.
Change this by going into the admin->virtuemart->product list-> edit product and change the stock on the Product Status Tab.
Wednesday, December 21, 2011
How to Add an image link to a Nivo Slider using Next Gen Gallery for Wordpress
This setup is for when you need to use a custom field say a Link for your Next Gen Gallery images while viewing the images in a Nivo Slider. In particular I am using the Easy Nivo Slider.
First get your gallery setup with all of your images. Next go get the Next Gen Gallery Custom Fields . Once the plugin is installed add a new field called "link", now each of your images will have a link field in the gallery manager. Fill out a link for each.
Next in the Easy Nivo Slider get that plugged into an article or in one of your templates. Once that is done and the slideshow is running at the dimensions that you need. Your ready to add the custom fields to the output.
The Custom fields in the Next Gen gallery are not called in the Easy Nivo Slider so we will need to use some functions to get the particular field.
Open up the file plugins/easy-nivo-slider/nextgen/list-images.php
You should find the php code that displays the image tag around 185.
echo '<img src="'.$image->imageURL.'" '. $image_description.$size.' border="0" />';
Just before that code we are going to add the php to output our new custom link field.
We will use the function from the Next Gen Gallery Custom Fields functions.php file called nggcf_get_field. It takes 2 parameters ('PHOTO ID','CUSTOM FIELD NAME')
//get the field value from the Next Gen Gallery Custom Fields using the photo id
$linkval= nggcf_get_field($result->pid,'link');
if($linkval !='')
echo "<a href=\"" . $linkval . "\">";
So thats it now you have outputted your custom field of link before the image is ouput. I would also reccomend closing the a tag after the image is displayed. Here is the full snippet.
//codepyro hack using the next gen gallery custom fields to get the custom field of link for each photo
$linkval= nggcf_get_field($result->pid,'link');
if($linkval !='')
echo "<a href=\"" . $linkval . "\">";
// Output the image
// Note that this outputs the original nextgen image, not the resized one. need to figure out how
// to get that one, if it exists
echo '<img src="'.$image->imageURL.'" '. $image_description . $size .' border="0" />';
if($linkval !='')
echo '</a>';
Tuesday, December 20, 2011
MSSQL subquery as a list.. i.e. return categories as a select item
If you have ever wondered how to return a list of categories with a select statement heres the answer. It actually comes from StackOverflow.This is a repost so I can find it later as I am sure that I have needed to do this about 20 times in the past.
This is Really clever and full credit goes to this really Smart guy Niikola
Here is a simple-ish query, gets some user data along with the list of categories. The Category table is separate with a linking table called contact_category_xref which holds the category id and the contact id associated.
SELECT
c.id,
c.FirstName,
c.LastName,
c.email,
c.City,
c.State,
Stuff((select ','+cat.name from category cat left join
contact_category_xref x
on cat.id = x.catid
where x.contactid = c.id
For XML PATH('')),1,1,'') as categoryList
FROM contacts c
Ill attempt some explanation, feel free to jump in and offer corrections please.
The first bit of Magic comes in the form of the "For XML Path('')" command in sql returns the query columns as XML which is incredibly handy.
"pizza ,pie "
Now to get rid of the xml portion concatenating the comma before the cat.name returns the list without XML. example ',pizza,pie,cookies,snickers'
I have no Idea how this works or why but it does. Please feel free to explain if you know.
So Whats left is the STUFF command which removes the first character for 1 character in length and replaces it with ''. Which means we are left with our nicely formatted list 'pizza,pie,cookies,snickers'.
Pretty COOL i must say.
Tuesday, December 13, 2011
Size Nivo slideshows for mobile using CSS
Yep, you sure can scale and re-size the Nivo and many other jQuery or Mootools slideshows using CSS media queries.
To get started I am using
The easy-nivo-slider for Wordpress. This is in conjunction with Really Nice NextGen Wordpress Gallery Manager plugin.
(If you need to learn these just visit their respective pages.)
Now to the quick goodies. I am only showing the normal website width and a small mobile. I would reccomend setting another media query for around 768px wide, or go look up common mobile device screen sizes
//Normal width of a website
.easy-nivo-slider-first
{
width:700px;
}
//CSS media Query for screen sizes less than or equal too 320px wide
@media only screen and (max-width: 320px) {
.easy-nivo-slider-first
{
width:300px;
}
Friday, December 02, 2011
Export Lists from Outlook to csv
Open up the contacts
Click to highlight a list
Choose File->Save As
Change the Save As Type to "Text Only .txt"
Save the file
Then open excel
Next goto File->Open Choose your file
- Choose Next
- make sure Tab is checked
- Click Finish
Next choose File->Save As
Save your file as a csv
Friday, July 29, 2011
Adobe Wallaby - flash to html5 canvas conversion tool
Just gave wallaby a try with a new flash project. Wallaby is a beta utility that converts flash fla to html5 svg. It has some problems but I am pretty impressed with it thus far. Although it doesn't produce anything of professional quality nor create anything that can be polished. Can't wait until its a fully functional product, its about time adobe figured out a way to support more devices!
Here are a list of release notes with supported features below.
Browsers tested and sorta working:
Safari 5.0.3 - had some loading issues but good results
iPod mobile safari v??? - partly worked, not all animation loaded
Chrome v12.0.742.122 - best results
Firefox 5 - dont work at all :(
IE9 - failure as well
The animation came across exactly as in the flash fla (CS4).
Sound did not get converted
Buttons - hover actions and links don't work
Convert project contains
- jQuery 1.4.2
- project_source_assets - folder for all the svg files
- project.html - loads all svg resource in div containers with styles for the resource/tween/sprite.
- project.js - file that starts animation for objects and children
- project.css - styles and css based webkit animations, the styles have an underscore and a number which seems to inidicate the motion or tween setup in flash.
i.e.
.wlby_260
{
-webkit-animation-duration: 0.28125s;
display: none;
position: absolute;
-webkit-transform: matrix(1, 0, 0, 1, 182.55, 270.05);
}

