You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
thezazzi wrote:
Where abouts was Username & Password originally entered?
For CCP right on that page. The user and password were created by you through your hosts control panel or by the person who did your install.
thezazzi wrote:
Looking though my hosts cPanel it shows the database and database users, there's no option to change passwords only to add a user to that database so I'm not to sure where about i need to look.
I've never understood why cPanel doesn't provide a way to change MySQL user passwords but it doesn't. In your situation I'd probably create another user with ALL privileges to the CCP database and use it for what you're trying to do. Or go back to the person who installed CCP for you and ask for the password for the existing user.
You may also find the password by looking at the contents of config.php in the private CCP folder.
thezazzi wrote:
I'm not to fussed about having to add a new user so i can access the db but its the fact that it should be me who knows all the passwords and no one else.
I'd normally agree with you but you'd be surprised at the number of people who do not want to know that amount of detail. I do installs all of the time where I get nothing more than control panel credentials and do all of the set up of MySQL. The client never asks for or receives the "gory details" unless they specifically ask for it.
Personally, if I gave out that much detail I'd be changing every password as soon as the installation was completed But that's just me.
Offline
Thanks for all the help and time on this Dave, its appreciated.
With the new user I've created and given all privileges to, can i then safely delete the original user then run the installer to step 11 and add the new username and password, continue to step 12 then stop.
Or should i add the new username and password at step 11 first then delete the original user from the db just to be safe.
Offline
I'd make the change via the installer and make sure everything works correctly, including ordering and making updates through admin, before I removed the previous user.
Offline
Every thing seems to be working fine. Orders are being processed and email sent.
I will wait a while before i delete the original user just as a precaution.
Thank you again for the help on this Dave. i'l have a better understanding how the installer process works now when i upgrade to V7.
Offline
Is there a way to change the image size to about 50px in the code rather than having to uploading smaller images?
Offline
I thought I would post in this thread if you are looking for a different way of enabling this function that offers more options and cleaner CCP integration you might want to view the following thread: https://forum.kryptronic.com/viewtopic.php?id=25157
Offline
I have been searching through admin: xhtml includes to try and find away to change the width of the image in the php itself but I'm struggling to find an answer.
Ive looked at this thread which i think may have the answer but don't know how to incorporate this in to the php of the 'Random Product' hack.
Has anyone managed to accomplish this at all?
Offline
could i use this img tag directly in the php of something like this to manipulate the image size?
<img class="randimg" width="45" height="50"
I have tried this but cant get it to work.
Offline
Is it possible with Mysql to run a multi query?
For example what im tyring to do is edit the query for this mod to say something like:
WHERE `splashdisp` LIKE '1' `pricedisp` LIKE `sale` order by rand() LIMIT 5" ) or die...
Basically it has to match both queires.
Offline
Sure. Exactly like you have it but pricedisp won't contain the word sale. It's a single upper case character.
Offline
Haha..thanks Dave, i found that what i wrote was exactly what i needed just after i posted, you beat me to a reply before i can post back that it was resolved - thanks as always though
Offline
Queries may be as complex as required and use a combination if ANDs and/or ORs. If you look at some of the queries built by CCP when looking for products in a category for example you'll see a combination of both of those and then some.
Offline
Using a div within a table column should not cause any validation errors.
Offline
Running into a slight problem with this that i can't seem to figure out...
Looking up items in a particular category works perfectly, but only if the product is in just one category, when an item is related to more than one category it does not work, is there a way of getting this to work with items that are related to more than one category?
This is current code;
FROM ecom_prod WHERE `xcat` LIKE 'MONITOR'
This will only disply items in the MONITOR category as long as that is the only category related to the item.
Offline
Add % around the word monitor (%monitor%) to broaden the search. That's the quick and dirty solution and you may get more than you want using it.
Offline
Thanks Dave, this seems to work ok
Offline
Another example of this code in use for a horizontal display (thanks also to Perkster):
<?php $host = 'localhost'; $dbUser = 'dbuser'; $dbPass = 'dbpassword'; $db = 'dbname'; print "<table border=\"0\" cellpadding=\"10px\" cellspacing=\"0px\"><tr>"; mysql_connect("$s", "$u", "$p") or die(mysql_error()); mysql_select_db("$d") or die(mysql_error()); $result = mysql_query("SELECT id,catimg,name FROM gbu0_cat order by rand() LIMIT 5" ) or die(mysql_error()); while($row = mysql_fetch_array( $result )) { print "<td style=\"vertical-align: top;\"><br /><a href=\"/gbu0-catshow/" . $row['id'] . ".html\"><img alt=\"\" src=\"media/gbu0/cat/" . $row['catimg'] . "\" /><br />" . $row['name'] . "</a></td>"; } print "</tr></table>"; ?>
or (for vertical use):
<?php $host = 'localhost'; $dbUser = 'dbuser'; $dbPass = 'dbpassword'; $db = 'dbname'; print '<table border="0" cellpadding="10px" cellspacing="0" style="width: 100px; position: relative; top: -15px;"><tr>'; mysql_connect("$s", "$u", "$p") or die(mysql_error()); mysql_select_db("$d") or die(mysql_error()); $result = mysql_query("SELECT id,imgsm,name FROM gbu0_prod order by rand() LIMIT 3" ) or die(mysql_error()); while($row = mysql_fetch_array( $result )) { print '<td style="vertical-align: center; text-align: center;"><a href="/gbu0-prodshow/' . $row['id'] . '.html"><img alt="" src="/media/gbu0/prodsm/' . $row['imgsm'] . '" /><br />' . $row['name'] . '</a></td></tr>'; } print '</tr></table>'; ?>
Offline