Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Naveen

Pages: [1] 2 3

In functions.php


.= ">".str_repeat("--"$depth 1).

Replace with

.= ">".str_repeat(""$depth 1).


What can I change in the below code to get rid of "--" in category listing?

Category 1
-- Category 2
-- Category 3

Changed to

Category 1
Category 2
Category 3

function get_type_dropdown($name$select 0$type "text"$field ""$default true$empty true$class ""$js "")
if (isset(
$select = (int)$HTTP_POST_VARS[$name];
$return "<select name=\"" $name "\" class=\"categoryselect" $class "\" " $js ">\n";
$return .= get_type_dropdown_options($select$type$field$default$empty);
$return .= "</select>\n";



Guys, is it possible to remove the category hierarchy in the "Add/ edit images" panel? That will make it easy to find / type out the category name. Currently I can type/seach only the top level categories, so for sub categories, we need to scroll manually and remember to which top level category it belongs. I have around 300 categories with only 10 top level.



Anyone to help with the above? It's been a while and I'm still trying to find ways.


I am currently using the other SEO mod which has category and images as    /cat1.htm and /img1234.htm

I am planning to move to this mod with the new 4images update.

My concerns are

1) How do I 301 redirect old urls (ca1.htm / img1234.htm) to new urls
2) How can I have all images into another structure/folder (/images/image-name-id.htm) and keep categories in root.

This is the current htaccess

Code: [Select]
# Begin search engine friendly links code
RewriteEngine On
#RewriteBase /
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}

RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}

RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.([0-9]+)\.htm$ categories.php?cat_id=$1&page=$2&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.htm$ categories.php?cat_id=$1&%{QUERY_STRING}

RewriteRule ^img([0-9]+)\.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.([a-zA-Z0-9]+)\.htm$ details.php?image_id=$1&mode=$2&%{QUERY_STRING}

RewriteRule ^postcard([a-zA-Z0-9]+)\.htm$ postcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}

# End search engine friendly links code

Mods & Plugins (Requests & Discussions) / Re: Track 404 pages
« on: June 28, 2012, 09:36:12 AM »
Also, if we can have a 301 manager, which redirects deleted pages to new location  :D

I already have canonical tag working on each page. However that is not the solution to the problem, I need to get rid of (*.search.htm) Infact anything.htm works and loads the page. i.e  <--- this should not happen.

Ok, I have been using this mod for quite a few years now and I have had no issues untill today.

Somehow google had crawled pages with search extension i.e

Normal image url =
Issue URL =

This has resulted in 100s of duplicate url in google webmaster sitemaps.  for odd reasons returns next and previous images as  and next images as

How do I get rid of this now?  :oops:

Discussion & Troubleshooting / Re: Recover deleted image IDs
« on: June 26, 2012, 06:45:45 AM »
I am sure this is easy to do, can someone be kind and help?

Mods & Plugins (Requests & Discussions) / Track 404 pages
« on: June 25, 2012, 11:12:31 AM »

Currently any 404 page is 302 redirect to index page. Can we have a plugin which will track all 404 links and referral URLs so it is easy to resolve the 404. This is a very useful plugin to keep track of what is going wrong with the site.


Discussion & Troubleshooting / Recover deleted image IDs
« on: June 24, 2012, 05:59:50 AM »

I have deleted few images and those ID linked from other sites return error and redirect to index page, this also hurts my seo. If I add new images, new image IDs are created.

Can I tweak the DB or script to add images to deleted image IDs instead of creating unique IDs? Also can I do the same for categories also.


Chit Chat / Re: 4images Happy 10th Birthday!
« on: March 16, 2012, 01:15:41 PM »
Thank you for this magical script and Happy Birthday  :P ..... You are good for 100 more years.

Discussion & Troubleshooting / Re: Session ID and Mysql tweaking.
« on: February 03, 2012, 01:42:21 PM »
OK ... So I got banned again .. and I seriously need some help here.

The reason that your account keeps hitting MySQL limits is due to the number of "Rows Read" from the database "xxxxx" as well as the IO being generated by the constant updates on the database "xxxx".

What can be changed to make 4 images use minimal queries ... and if sessions can be saved as files?

I use 4images as a gallery section and do not need all the features which are provided, just browsing.

Discussion & Troubleshooting / Session ID and Mysql tweaking.
« on: January 27, 2012, 07:23:22 AM »

Turns out that my host does not like me much considering the amount of resources I have been using lately.

After few discussion and tweakings like cache, disabling random image / cat / hit counter etc, the gallery is running "ok".

The host says

At this point I am not seeing any running queries which are using excessive resources. Looking through old logs, all I can say is that the db_4images database has historically had the most performance issues. This appears to be related to keeping session data in the SQL database instead of as files.

I would like to disable session storage all together as I do not allow users to register on my site, it is just a gallery site managed by me only. The visitor has no role other than browsing the site. The site is currently running on cache.

Can this be done?

I would also like to disable any other insert/update queries if possible to reduce the load further.


I had around 24 images on a page, for some reason I changed it to 40 images per page. For some categories, this has resulted in no second page as there were less than 40 images, however the second page still responds but shows the content of first page itself. Causing duplicate content and poor user experience.

cat108.htm?page=anynumber returns the page one.

I would like this to redirect to index page and not load the picture gallery.

Please do help  :o

Pages: [1] 2 3