WebWorker Posted April 26, 2010 Author Share Posted April 26, 2010 @Eric - The action hook mod you mention makes its own Mysql connection instead of using the existing one that WHMCS already has open? I personally would want to reuse the existing connection if possible, but just waned to know in case this is something that should be updated in the master namespinner.tpl or just added as a footnote for special cases. 0 Quote Link to comment Share on other sites More sharing options...
manndaar Posted May 1, 2010 Share Posted May 1, 2010 I found the issue with my problem and a solution. For anyone having the same issues, what I saw was that a hook that I had setup was using mysql calls. This overrides any connections that this mod makes. In order to to fix my problem, I had to specify the database connection in the namespinner.tpl file. This is what I used... Just before the first mysql_query call, add these two lines: Just after the last mysql call, add this: Hopefully this helps someone else. -Eric I am very bad at PHP. will you please paste whole new updated namespinner.tpl with addition to your "mysql_query call". Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
getup Posted June 29, 2010 Share Posted June 29, 2010 It has nothing to do with MySQL on our installation. The script assumes a the Smarty modifier 'lower' is available, which WHMCS does not include on a default installation. To solve this, create a file in "includes/smarty/plugins/" called "modifier.lower.php". Put the following content in: <?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty lower modifier plugin * * Type: modifier<br> * Name: lower<br> * Purpose: convert string to lowercase * @link http://smarty.php.net/manual/en/language.modifier.lower.php * lower (Smarty online manual) * @param string * @return string */ function smarty_modifier_lower($string) { return strtolower($string); } ?> And you're done. If this does not solve your issue, add $display_errors=true; to your configuration file. Would have spared us some discussions over here. 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted June 30, 2010 Author Share Posted June 30, 2010 It has nothing to do with MySQL on our installation. The script assumes a the Smarty modifier 'lower' is available, which WHMCS does not include on a default installation. To solve this, create a file in "includes/smarty/plugins/" called "modifier.lower.php". Put the following content in: And you're done. If this does not solve your issue, add $display_errors=true; to your configuration file. Would have spared us some discussions over here. Interesting, I had assumed everyone had the full Smarty library. Good find getup. You could also replace all occurrences of |lower with |strtolower in the .tpl itself. I sent a support request into WHMCS to find out why the entire Smarty library isn't included with the distribution. 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted July 3, 2010 Author Share Posted July 3, 2010 Updated to version 1.6 -------------------- Change Log -------------------- 1.6 -Updated distributed zip file to have the neccessary files already in the correct location - *thanks getup* -Changed |lower modifier to use php function |strtolower since WHMCS does not include all plugins from the official Smarty library -Added new variable $createnewdbconn which when set to true will create a new database connection (only neccessary if some other script had closed WHMCS's db connection, and recommended to be left as false unless needed) Download at http://ideamesh.com/file/16/WHMCS-ENOM-NameSpinner-v16.html 0 Quote Link to comment Share on other sites More sharing options...
prasanth Posted August 12, 2010 Share Posted August 12, 2010 I have installed it all right as per instructions but i get the following error when i set debug to true User not permitted from this IP address - 4 <?xml version="1.0"?> <interface-response> <Command>NAMESPINNER</Command> <Language>eng</Language> <ErrCount>1</ErrCount> <errors> <Err1>User not permitted from this IP address - 4</Err1> </errors> <ResponseCount>1</ResponseCount> <responses> <response> <ResponseNumber>713254</ResponseNumber> <ResponseString>Policy error; unauthorized; user(s)</ResponseString> </response> </responses> <MinPeriod>0</MinPeriod> <MaxPeriod>0</MaxPeriod> <Server>sjl01wresell08</Server> <Site>eNom</Site> <IsLockable>False</IsLockable> <IsRealTimeTLD>False</IsRealTimeTLD> <TimeDifference>+0.00</TimeDifference> <ExecTime>0.031</ExecTime> <Done>true</Done> <debug></debug> <TrackingKey>0ec58cdd-ee37-4813-b980-47bf3eff5a81</TrackingKey> </interface-response> Enom confirms my ip is authorized by them why is this happening any idea ? 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted August 12, 2010 Author Share Posted August 12, 2010 Are you using reseller hosting with your own purchased dedicated IP address? If so the outgoing IP address will be the primary address of the server, not your dedicated address. Also Test mode uses the test server on Enom, not their live environment. You can edit which IP addresses are authorized for the test environment through the Enom web interface. 0 Quote Link to comment Share on other sites More sharing options...
prasanth Posted August 13, 2010 Share Posted August 13, 2010 Yes that was the issue thanks webworker , Works now 0 Quote Link to comment Share on other sites More sharing options...
jainritesh Posted September 10, 2010 Share Posted September 10, 2010 It Works Great, Had the same problem like in #131 it's working now. Thanks for the nice plugin Regards, Ritesh Jain 0 Quote Link to comment Share on other sites More sharing options...
fangster Posted November 25, 2010 Share Posted November 25, 2010 I have the problem that i can only get the namespinner to work in firefox (3.6), i have tried IE 8, chrome, and safari but it doesnt show up, with or without the debug. I have only so far used the test mode. I have tried it logged in and not logged in. but still no namespinner. any ideas. Thanks 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted November 29, 2010 Author Share Posted November 29, 2010 I have the problem that i can only get the namespinner to work in firefox (3.6), i have tried IE 8, chrome, and safari but it doesnt show up, with or without the debug. I have only so far used the test mode. I have tried it logged in and not logged in. but still no namespinner. any ideas. Thanks The namespinner doesn't have any CSS or JS that would prevent it from working in one browser or another. It uses nearly identical code to the table that displays "Choose Domains" above it. 0 Quote Link to comment Share on other sites More sharing options...
RFEHosting Posted January 3, 2011 Share Posted January 3, 2011 Has this been updated for WHMCS 4.4? seems there are some template changes that are not in the install directions. 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted January 5, 2011 Share Posted January 5, 2011 Wondering about this too. Also, can someone provide the form code to add to any page? 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted January 5, 2011 Share Posted January 5, 2011 i have updated recently from 4.2.1 to 4.3.1 and then to 4.4.1 (just in case not directly updated to 4.4.1) and is working without problem nor modification. Chad, if you mean the code to add the domain search, just go to Utilities --> Integration Code section in your whmcs admin panel. 0 Quote Link to comment Share on other sites More sharing options...
Grizzlyware Josh Posted January 18, 2011 Share Posted January 18, 2011 This is a great mod, but this thread is sooooo long now it's taking me ages to work out if this works in bulk domain search? In the download, it has instructions and I've followed them to the tee. It doesn't mention anything about the bulk search, so... I guess it doesn't? No problem if it doesn't I'm just curious if I'm missing something! Once again, great mod! 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted January 28, 2011 Share Posted January 28, 2011 This is not working for me using ajax order link and v4.4.2 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted January 28, 2011 Share Posted January 28, 2011 This is not working for me using ajax order link and v4.4.2 I dont think it was ever part of the order form, was it? I thought it was mainly justed used in the domain checker area. I could be wrong, I havent messed with it in probably 2 years. 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted February 2, 2011 Share Posted February 2, 2011 (edited) This is not working for me at all. I edited addondomain.tpl in web20cart folder. Starting with line 75, 76, 77 <p align="center"> <input type="submit" value="{$LANG.addtocart}" class="buttongo" /> </p> I inserted the code (and modified variables) before the </form> The recommended domain area does not show up at all. Yes, I checked and tested via the cart.php method, not ajax order form. Edited February 2, 2011 by Chad 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted February 3, 2011 Share Posted February 3, 2011 I had the domain's IP authorized with ENOM. However: In debugging, I get this output: <?xml version="1.0"?> <interface-response> <Command><![CDATA[NAMESPINNER]]></Command> <Language><![CDATA[eng]]></Language> <ErrCount><![CDATA[1]]></ErrCount> <errors> <Err1><![CDATA[user not permitted from this IP address - 4]]></Err1> </errors> <ResponseCount><![CDATA[1]]></ResponseCount> <responses> <response> <ResponseNumber><![CDATA[]]></ResponseNumber> <ResponseString><![CDATA[Policy error; unauthorized; user(s)]]></ResponseString> 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted February 4, 2011 Share Posted February 4, 2011 Finally got the output working, but now under 'more info' where the payment cycle and price drop downs are, they are all blank??? 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted February 4, 2011 Share Posted February 4, 2011 I just found the latest v1.6 on the OP's site. I used that method now, and it doesn't work? Debugged says "bad username or passord -3"? My login is certainly correct. 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted February 8, 2011 Author Share Posted February 8, 2011 I dont think it was ever part of the order form, was it? I thought it was mainly justed used in the domain checker area. I could be wrong, I havent messed with it in probably 2 years. This is not working for me using ajax order link and v4.4.2 No it is not compatible with the Ajax order form. Possibly in the future this might be added. 0 Quote Link to comment Share on other sites More sharing options...
WebWorker Posted February 8, 2011 Author Share Posted February 8, 2011 I just found the latest v1.6 on the OP's site. I used that method now, and it doesn't work? Debugged says "bad username or passord -3"? My login is certainly correct. Are you able to order Enom products normally through WHMCS? The namespinner uses the same credentials that you use for setting up Enom as a registrar in your system. In your Enom setup there is a checkbox for test mode. Namespinner will use this flag to determine whether namespinner requests get sent to the live Enom reseller server or to the reseller test server. I can also now confirm that this is working for WHMCS 4.4.2 in case anyone was wondering. If you are still having problems setting things up I do offer a one time setup service for this addon. Please see the section "Installation Service" at http://ideamesh.com/file/16/WHMCS-ENOM-NameSpinner-v16.html 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted February 8, 2011 Share Posted February 8, 2011 The enom api itself is working fine for me using the same credentials. 0 Quote Link to comment Share on other sites More sharing options...
lochie Posted March 19, 2011 Share Posted March 19, 2011 New features: Ability to sort multiple ways Added debug mode variable Recommended Install Steps Create a new .tpl file in your orderforms template called namespinner.tpl In adddomain.tpl add the line : {include file="orderforms/cart/namespinner.tpl"} directly before before the last </form> tag In configureproductdomain.tpl add the line : {include file="orderforms/cart/namespinner.tpl"} directly before before the last </form> tag Block tpl access from the web {if $domain neq "transfer"} {php} /** * @version 1.1 * @since WHMCS 3.8 * @copyright 2009 http://ideamesh.com This script is owned and licensed by Ideamesh, Inc. * You may use this script in commercial applications, however you may not resell * this script without permission of Ideamesh, Inc.<br> * Please contact (sales [at] ideamesh [dot] com) for more information */ //Set to true to get debug messages $debug = false; //Edit these to your actual enom username and password $enomid = "enomusername"; $enompw = "enompassword"; //Max number of spins to generate $maxspins = 20; //Choose which options to show in the spin results //Enom only will return .com, .net, .cc and .tv results that's why these were chosen $showdotcom = true; $showdotnet = true; $showdotcc = false; $showdottv = false; //Can be one of these values ("tld"|"sld"|"score") $sort1 = "score"; $sort2 = "sld"; //Can be one of these values (SORT_ASC|SORT_DESC) $sort1order = SORT_DESC; $sort2order = SORT_ASC; //Set this to "True" for blocking sensitive content or "False" to allow sensitive content $sensitivecontent = "True"; // Extract Smarty variables extract($this->_tpl_vars); //Do not edit this. We're setting up the URL to retrieve the spins $namespinnerurl = "https://reseller.enom.com/interface.asp?command=namespinner&uid=".$enomid."&pw=".$enompw."&SLD=".$sld."&TLD=".$tld."&SensitiveContent=".$sensitivecontent."&MaxResults=".$maxspins."&ResponseType=XML"; // Use cURL to get the XML response $ch = curl_init($namespinnerurl); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); if ($xml) { $spinnerresults = new SimpleXmlElement($xml, LIBXML_NOCDATA); if ($spinnerresults->ErrCount == 0) { for ($i=0; $i<$maxspins; $i++) { if ($showdotcom && (string)$spinnerresults->namespin->domains->domain[$i]['com'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".com", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['comscore'], 'tld' => '.com'); if ($showdotnet && (string)$spinnerresults->namespin->domains->domain[$i]['net'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".net", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['netscore'], 'tld' => '.net'); if ($showdotcc && (string)$spinnerresults->namespin->domains->domain[$i]['cc'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".cc", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['ccscore'], 'tld' => '.cc'); if ($showdottv && (string)$spinnerresults->namespin->domains->domain[$i]['tv'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".tv", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['tvscore'], 'tld' => '.tv'); } $gotnamespinner = true; } else { $gotnamespinner = false; } } else { if ($debug) echo "Cannot retrieve XML file. Please check your firewall settings"; $gotnamespinner = false; } if ($debug) { echo "<pre>"; echo htmlentities($xml); echo "</pre>"; } //Get domain pricing for .com, .net, .cc and .tv if ($gotnamespinner) { $sql = "SELECT extension, register, registrationperiod FROM tbldomainpricing WHERE extension in ('.com', '.net', '.cc', '.tv');"; $query = mysql_query ($sql); while ($row = @mysql_fetch_array ($query, MYSQL_ASSOC)) { $domainprices[$row['extension']][$row['registrationperiod']] = $row['register']; } } // Setup for the sorting foreach ($spinner as $key => $row) { $spin['sld'][$key] = $row['domain']; $spin['score'][$key] = $row['netscore']; $spin['tld'][$key] = $row['tld']; } array_multisort($spin[$sort1], $sort1order, $spin[$sort2], $sort2order, $spinner); //Send some variables back to the template $this->assign('spinner', $spinner); $this->assign('gotnamespinner', $gotnamespinner); $this->assign('domainprices', $domainprices); {/php} {if $gotnamespinner} <p class="cartsubheading">We also recommend</p> <table class="clientareatable" style="width:90%;" align="center" cellspacing="1"> <tr class="clientareatableheading"><td>{$LANG.domainname}</td><td>{$LANG.domainstatus}</td><td>{$LANG.domainmoreinfo}</td></tr> {foreach key=num item=result from=$spinner} <tr class="clientareatableactive"> <td width="33%">{$result.domain}</td> <td width="33%" class="domaincheckeravailable"><input type="checkbox" name="domains[]" value="{$result.domain|lower}"{if $result.domain|lower|in_array:$domains} checked{/if} /> {$LANG.domainavailable}</td> <td width="33%"><select name="domainsregperiod[{$result.domain|lower}]"> {assign var=thistld value=$result.tld} {foreach key=years item=regoption from=$domainprices.$thistld} <option value="{$years}">{$years} {$LANG.orderyears} @ {$currencysymbol}{$regoption} {$currency}</option> {/foreach}</select> </td> </tr> {/foreach} </table> <p align="center"><input type="submit" value="{$LANG.addtocart}" /></p> {/if} {/if} I've just followed what appears to be simple steps but it failed to work, I've adjusted the username and password, created the file, added the line of code on each of the 2 files above the last </form> but doesn't show anything when trying to search. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.