Skip to content
JoomlaProdigy Forum
Welcome, Guest
Please Login or Register.
Lost Password?
Re:PHP Notice: Undefined offset (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:PHP Notice: Undefined offset

#1682
eaucourante (User)
Junior Boarder
Posts: 5
graphgraph
Click here to see the profile of this user
PHP Notice: Undefined offset 2007/06/04 14:50 Karma: 0  
Hi,

I just installed this wonderful plugin. I'm impressed by how well it works. I only need to get the thumbs working, but I found the solution for that in another thread, which I will try out tomorrow when I can access the server. I do have another error, for which I can't find a solution.

When I load a page I get this notice:

PHP Notice: Undefined offset: 5 in D:WebsitesOBHM_V3mambotscontentplugin_hs_jp.php on line 189

How can I fix this?

Thanks in advance for the help...

I only installed the mambot (version 1.8) btw. Perhaps I need to install the component too?
  The administrator has disabled public write access.
#1685
admin (Admin)
Admin
Posts: 840
graph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 16:20 Karma: 19  
Please search forum for me. I think I wrote the solution somewhere in forum. If you still don't find it let me know I will look at it.
  The administrator has disabled public write access.
#1687
eaucourante (User)
Junior Boarder
Posts: 5
graphgraph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 16:37 Karma: 0  
I searched, but I couldn't find a solution.

I checked the .php file on line 189, but I see nothing regarding offsets there (though I must mention, I'm a complete php noob).

Line 189 (according to my viewer):
if($images[$a]['filename'] != '') {
  The administrator has disabled public write access.
#1690
admin (Admin)
Admin
Posts: 840
graph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 17:14 Karma: 19  
try change line 186 to this
if($noimage !=0) {

and let me know. Also can you provide me a link to the page. It seems it is not able to create an array of images and there is no key to find an array value which is image name.
  The administrator has disabled public write access.
#1691
eaucourante (User)
Junior Boarder
Posts: 5
graphgraph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 17:26 Karma: 0  
I edited like you said. The code is now:

Code:

 <div class="imgbox">';        if($noimage !=0) {          for($a = 0;$a<=$noimage;$a++) {          //$ct='<div class="ctd">';              if($images[$a]['filename'] != '') {              $image_name= $images[$a]['filename'];              $image_name_form=substr($image_name,0,-4);              if ($is_comments == 1){              $database->setQuery( "SELECT count(*) FROM #__hsjp_comments WHERE image_name = '$image_name_form' AND published='1'");             $totalComments = $database->loadResult();             $totalComments = "[$totalComments]";             }              $linkit .= '<div class="img-shadow"><a id="'.$image_name.'" href="'.$mosConfig_live_site.$rootfolder.$url.'/'.$images[$a]['filename'].'" class="highslide" onclick="return hs.expand(this)"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_hs_jp/makethumb.php?img='.$url.'/'.$images[$a][' filename'].'&w='.$_width_.'&h='.$_height_.'&q='.$_quality_.'"></a></div>';         //}          $linkit .='



Still the same error....
  The administrator has disabled public write access.
#1692
eaucourante (User)
Junior Boarder
Posts: 5
graphgraph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 17:28 Karma: 0  
My page is not online yet...
  The administrator has disabled public write access.
#1695
admin (Admin)
Admin
Posts: 840
graph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/04 19:19 Karma: 19  
I have no other solution at this moment. May be you will find a solution playing with . Try to use some other folder. Make sure your image extensions are correct. try not to use imaeg with a number in image name etc. It is weired but with one guy I remember, the image name was an issue.
  The administrator has disabled public write access.
#1700
eaucourante (User)
Junior Boarder
Posts: 5
graphgraph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/06/05 01:05 Karma: 0  
The images are regular jpges. I've tried changing folders and the image names, nada.

Guess I'll be looking for another gallery... Too bad, as I really liked the look of HighslideJP. Ah well, can't have everything.

Thanks for trying to find a solution.
  The administrator has disabled public write access.
#2257
studiogrynn (User)
Fresh Boarder
Posts: 4
graphgraph
Click here to see the profile of this user
Re:PHP Notice: Undefined offset 2007/09/19 18:23 Karma: 0  
Similar issue. After installing beta 2 and getting errors, I uninstalled beta and installed stable 1.8
Get:
Notice: Undefined offset: 4 in [localpath]mambotscontentplugin_hs_jp.php on line 189
Tried your patch on line 186, returned same error

code is line 185-196
Code:

 <div class="imgbox">';              if($noimage) {                 for($a = 0;$a<=$noimage;$a++) {          //$ct='<div class="ctd">';              if($images[$a]['filename'] != '') {              $image_name= $images[$a]['filename'];              $image_name_form=substr($image_name,0,-4);              if ($is_comments == 1){              $database->setQuery( "SELECT count(*) FROM #__hsjp_comments WHERE image_name = '$image_name_form' AND published='1'");             $totalComments = $database->loadResult();             $totalComments = "[$totalComments]";             }

  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop

Buy Now

Recommended

Search

Recommended

Joomla Templates

Member Login

Refreshing page..Please wait!
                       Lost Password?    Can't Login?