Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: xchangeRate shows 'Access Denied' in Admin section

  1. #1
    Join Date
    Nov 2006
    Posts
    8

    Default xchangeRate shows 'Access Denied' in Admin section

    Hello, I tried to install xchangeRate, but when I open it in Admin section it shows error 'Access Denied', I read all posts about this mod, but couldn't find solution. I think this post should solve the problem, but it is inactive http://support.open-realty.org/showthread.php?t=9226. Maybe somebody could post the solution to this. Thanks in advance

  2. #2
    Join Date
    Mar 2006
    Posts
    122

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    It looks like the original thread has been pruned.
    This is going back a bit, and I've hacked my copy around a bit to suit my own purposes, but try these: -

    At line 434 AND line 517, change
    Code:
    if (!login::loginCheck('canEditForms',true))
    To
    Code:
    if (!login::loginCheck('Admin',true))
    The first one allows you to see the currency control panel, the second allows you to update it. This is due to a change in OR since the addon was written.

    The other problem was in getting updates from the bank, there is an error in the date field - some days it works, some days it doesn't.
    At line 385, change
    Code:
    date("Y-d-m", mk...
    To
    Code:
    date("Y-m-d", mk...
    You may also want to hide the admin icon from your agents (since they will only get "access denied" anyway...) To do this, wrap a login check around the icon code at line 135
    Change
    Code:
    	global$config;
    	$icon	=	'<a href="'.$config['baseurl'].'/admin/index.php?action=addon_xchangerate_admin"><img src="'.$config['baseurl'].'/addons/xchangerate/images/adminIcon.png" alt="xchangerate settings" style="border: 0px none transparent;" /></a>';
    	return $icon;
    To
    Code:
    	if (login::loginCheck('Admin',true))
    	{
    
    		global$config;
    		$icon	=	'<a href="'.$config['baseurl'].'/admin/index.php?action=addon_xchangerate_admin"><img src="'.$config['baseurl'].'/addons/xchangerate/images/adminIcon.png" alt="xchangerate settings" style="border: 0px none transparent;" /></a>';
    		return $icon;
    	}
    I think that's all the essential changes.
    Note that you MUST login and go to the Admin index page (/admin/index.php) so that the addon can create the tables it needs. If you don't, you will get a fatal error on line 397
    Good luck
    Last edited by welcome2; 02-09-2007 at 07:03 AM. Reason: additional info
    Jim

  3. #3
    Join Date
    Nov 2006
    Posts
    8

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    Now I get this error: Fatal error: Call to a member function on a non-object in /home/server/domains/mysite/public_html/addons/xchangerate/addon.inc.php on line 397

    This is the code:
    http://img260.imageshack.us/img260/3842/errormj0.jpg
    Code:
    386 function dbrates()
    387 {
    388	global $conn, $config, $curr;
    389	$date		=	date("Y-m-d", mktime(0, 0, 0, date("m")  , date("d")+1, date("Y")));
    390	$qry		=	"SELECT * FROM ".$config['table_prefix_no_lang']."addons_xchangerate_lastfetch WHERE checkrow = '1';";
    391	$checkQry	=	$conn->Execute($qry);
    392	$checkDate	=	$checkQry->fields[1];
    393	
    394	
    395		$ratesqry			=	"SELECT * FROM ".$config['table_prefix_no_lang']."addons_xchangerate ORDER BY addons_xchangerate_currency";
    396		$ratesdbfetch		=	$conn->Execute($ratesqry);
    397		$ratesArray			=	$ratesdbfetch->GetAll();
    398		foreach ($ratesArray as $key)
    399		{
    400			$currENCY	=	strtoupper($key['addons_xchangerate_currency']);
    401			$rates[$currENCY]['rate']	=	$key['addons_xchangerate_rate'];
    402			$rates[$currENCY]['symb']	=	$key['addons_xchangerate_symbol'];
    403			$rates[$currENCY]['show']	=	$key['addons_xchangerate_show'];
    404			$rates[$currENCY]['base']	=	$key['addons_xchangerate_base'];
    405			$rates[$currENCY]['curr']	=	$currENCY;
    406		}
    Thanks in advance for the help

  4. #4
    Join Date
    Mar 2006
    Posts
    122

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    That was something I had not noticed before.
    You have to view the site admin page (/admin/index.php) so that the addon installs correctly. I have updated my previous post.
    Jim

  5. #5
    Join Date
    Apr 2007
    Location
    Rugby, Warwickshire, UK
    Posts
    32

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    Yes these fixes work in that AGENT does not see the graphic and ADMIN can set system.

    BUT features does NOT show in current or new added listings ?

    I am using USD (base) and Euro + GBP ( 3 currencies ) what other code or admin changes are needed? or is there a FIX?

  6. #6
    Join Date
    Oct 2004
    Location
    Strasbourg France
    Posts
    87

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    add {addon_xchangeRate_price} in your listing_detail_
    Locvac.com
    U.M.P 2.41 with booking, Similar Listings ,Comparelistings,Feat,Latestproperties,Quicksearch ,Searchpclass,Sitemap,Userpage,XchangeRate,Zoom, Featured Listing Viewer,Addsite,imghighslide addons

  7. #7
    Join Date
    Apr 2007
    Location
    Rugby, Warwickshire, UK
    Posts
    32

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    Done, works a treat - thanks

  8. #8
    Join Date
    Nov 2006
    Location
    Brazil
    Age
    48
    Posts
    25

    Question Re: xchangeRate shows 'Access Denied' in Admin section

    I've made all the changes that are set in this topic and the admin page is blank now...Can somebody help?

  9. #9
    Join Date
    Nov 2006
    Posts
    179

    Default

    if you changed the original name of "price" field in your listing template in admin to your language you must change it in addon.inc (look for the red "price"...) it must be the value for price...



    Code:
    	
    	
    	$price		=	listing_pages::renderSingleListingItem($id, "price", "rawvalue");
    	
    	$xchange	=	xchangeRateSettings($price, $id);


    but if you didn't...

  10. #10
    Join Date
    Jun 2007
    Posts
    3

    Default Re: xchangeRate shows 'Access Denied' in Admin section

    Quote Originally Posted by Henristrike View Post
    I've made all the changes that are set in this topic and the admin page is blank now...Can somebody help?
    I have experienced the same problem. Initially, I had the 'Access Denied' problem. I made the changes recommended in the above posts. Access Denied disappeared but I am left with a blank page (header and footer sill there) but no content.

    Have checked the DB, and the the tables have been created as per the addon.

    I am using OR 2.4.1.

    Any help much appreciated.

    Regards & thanks,

    wolfmann

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •