Reputation Activity
-
Milli05 got a reaction from AblazeRich2 in Div that appears onclickHi!
It depends on the reason why you want to hide or show the product types. If the page would be too long if everything would be visible, then you can collapse and expand the types.
Examples for this:
https://jqueryui.com/accordion/#collapsible
http://v4-alpha.getbootstrap.com/components/collapse/
Is this what you are looking for?
-
Milli05 reacted to rbrtsmith in Free PSD to css templateMany places still use Photoshop for design, but I don't think it is the best way to do it, although that doesn't mean great results cannot be had.
To the OP why not just take existing websites and try and re-create them and learn that way. Any designer who's any good won't be producing designs for free, I can guarantee that.
-
Milli05 got a reaction from MikeH in No 'Access-Control-Allow-Origin' header is present on the requested resource.Yes, that helped a bit!
I searched for cors (I did not know how it was called before ) and found several tutorials.
I do not know why, but I had to put "always" in front of set.
Header always set Access-Control-Allow-Origin "*" Finally the error message disappeared and I can see Fontawesome!
Thank you!
-
Milli05 got a reaction from NOCK in No 'Access-Control-Allow-Origin' header is present on the requested resource.Yes, that helped a bit!
I searched for cors (I did not know how it was called before ) and found several tutorials.
I do not know why, but I had to put "always" in front of set.
Header always set Access-Control-Allow-Origin "*" Finally the error message disappeared and I can see Fontawesome!
Thank you!
-
Milli05 reacted to MikeH in No 'Access-Control-Allow-Origin' header is present on the requested resource.It's a CORS issue, place this in the <VirtualHost> for your static content:
<FilesMatch ".(eot|ttf|otf|woff)"> Header set Access-Control-Allow-Origin "*" </FilesMatch> -
Lines 7 and 11 look at the spacing in the string you're outputting..
line 7 you have
console.log("Generator #" + numGen + " is on, adding 62 MW, for a total of" + totalGen + "MW"); it should be
console.log("Generator # " + numGen + " is on, adding 62 MW, for a total of " + totalGen + " MW"); Also on line 14 you're string is off.
CodeSchool is picky about spacing, and your string output has to match the expected exactly.
-
Milli05 reacted to Samus in Randomise WP Tag CloudHow about returning all the the tags as an array rather than just the 9, randomize the first 9 indexes, and choose them.
e.g:
$args = array( 'number' => 0, 'format' => 'array', 'echo' => false ); $cloud_tags = wp_tag_cloud($args); shuffle($cloud_tags); for($i = 0; $i < 9; $i++) : // echo tags $cloud_tags[$i]; endfor; Of course, you won't be using this as a widget and will have to echo it into your template
I haven't tested at all, just from reference from link below, so it's possible you may have to check the output of the array, so you know how to handle it for the loop
http://codex.wordpress.org/Function_Reference/wp_tag_cloud
-
Milli05 got a reaction from NOCK in How do I save html code in a mysql database and have it spit it back out without changing it?Hi!
Did you writethe code that you save the string with? Or do you use a library or a framework.
For security reasons strings are converted before saved to a database with htmlaspecialchars. This converts html tags.
Try using htmlspecialchars_decode($str) when you read the data from the database.
-
Milli05 reacted to nomis in Hooking up Page and Category specific widget areaAh yes, multiple conditions. Now I remember all those (&& || !) doohickies. I had to remove the colon at the end of the first line, and it still won’t work if I include the endif, but without those it works just fine
I’m working in the functions file of a StudioPress Genesis template, and it says that I need to leave off closing delimiters at the end of files, so maybe that relates in some way to the endif problem.
Anyways up, it works great in the way shown below, so thank you soooooooooo much Milli.
P.S. I think I may be in love.
add_action( 'genesis_after_header', 'add_tuts_submenu' ); function add_tuts_submenu() { if (is_page('220') || is_category('15') || is_category('16') || is_category('17')) genesis_widget_area ('tuts-submenu', array ( 'before' => '<div class="wrap"><div class="tuts-submenu widget-area">', 'after' => '</div></div>', ) ); } -
Milli05 got a reaction from nomis in Hooking up Page and Category specific widget areaI think you could do it with one if statement:
if(is_page('59') || is_category('11') || is_category('12') || is_category('13')): genesis_widget_area ('blog-submenu', array ( 'before' => '<div class="wrap"><div class="blog-submenu widget-area">', 'after' => '</div></div>', ) ); endif; || means or .
As I can see you would like to place the same widget area if the page id is 59 or the category id is 11,12 os 13.
-
Milli05 reacted to teodora in 301 Redirection QuestionWelcome to WDF
I am not too confident with MS servers, but remember I have had to add redirects in the past via web.config. Just opened my old files to check how I did it and that's what I have:
<configuration> <system.webServer> <location path='URL to redirect'> <httpRedirect enabled="true" destination='URL to redirect' httpResponseStatus="Permanent" /> </location> </system.webServer> </configuration> Hope that helps
Alternatively, you can use server side language to do 301 redirect, depending on which one your site's written in. Here is a tool that generates 301 redirects in different languages:
http://www.rapidtables.com/web/tools/redirect-generator.htm
-
Milli05 reacted to EpicWebs in Help! Missing form data after "submit"You have to set a name on your input fields.
<input type="text" class="textbox" value="name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'name';}"> Should be
<input type="text" class="textbox" name="name" value="name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'name';}"> Good luck!
-
Milli05 reacted to EpicWebs in Help! Missing form data after "submit"It would also be worth looking into the filter_input function it's really powerful. http://php.net/manual/en/function.filter-input.php
-
Milli05 got a reaction from HighDarren in Order By Date not working?Hi!
I personally always use msql's default formats whet storing data.
I would set the type of the date field to timestamp and if you store the current date, just set the detault value to CURRENT_TIMESTAMP
You do not need to worry about this filed when saving data, it will be filled for you in the following format:
YYYY-MM-DD HH:II:SS
Ordering will definately work, and if you'd like to display the date in a different format, then format it before the display. e.g. using explode() to cut it at the space first then at the hyphens next..
I hope it helped.
-
Milli05 got a reaction from El Nino in Empty shopping cart (unset session)?If you are not familiar with ajax.
if(isset($_POST['empty_cart'])) { $_SESSION=array(); session_desrtoy(); header("Location:yourhomepage.php"); } <form action="" method="post"> <input type="submit" name="empty_cart" value="Empty Cart"> </form>
-
Milli05 got a reaction from kingy da killa in Warning: mysql_num_rows():Hi,
Are you sure that you have msyql connection? Or if you have, try to put
var_dump(mysql_error());
after
$checkusername = mysql_query("SELECT * FROM users WHERE Username = '".$username."'");
That will tell if something is wrong with the query.
-
Milli05 got a reaction from AlecIsh in Admin login securityHuh, as english is my second language , first I thought you were kidding...
but then I have found this link:
http://pbeblog.wordpress.com/2008/02/12/secure-hashes-in-php-using-salt/
Thanks!
-
Milli05 reacted to Connetu_C in Admin login securityIn many cases, assuming you trust your sysadmin, (salting and) hashing passwords is almost worthless... Why? Because a lot of programmers who do it use the same grant-all privileges user for everything on the entire database. Hashed passwords are designed to be kept in one low-level system so if they are exposed, they cannot be used to gain access to separate higher-level systems. But mostly they are stored in the same system/database - so if a "hacker" has access to the hashes, they already have access to your entire system/database, and there's probably a lot more in there that is more valuable than a few passwords. See the problem?
Don't get me wrong - hashes are good. But in so many cases I've seen, do nothing to actually improve security of your application. They do stop the sysadmin or a hacker from seeing people's actual passwords - which prevents them using them elsewhere to illegally access other accounts (like Facebook, Twitter, Amazon, eBay) where the user has used the same password. So definitely essential for your users' security - but useless for yours!
More likely weaknesses in your application include:
SQL injections: script vulnerabilities are used as an entry point to gaining easy access to your database.
Eavesdropping (man-in-middle attacks): easily used by hackers to gain access to your site, if it isn't using SSL certificates correctly. Any packets flowing over the network unencrypted will contain your users' passwords in plaintext, regardless of what hashing you do in the storage backend. That's far easier to intercept than passwords stored in your database.
Session "stealing" or "hijacking": whereby an interceptor learns of the unique (and secret) session ID given to a user and uses this to "take over" their session.
Brute force on database: if your database is running on an Internet-accessible port, brute force cracking becomes easier.
Lazy database privileges: accessing database under one (non-root) user allows complete access and control of all data.
Weak passwords chosen by users: allows easy dictionary attacks on your Web interface.
Solutions? Make sure your application is throughly hardened and tested, and implement HTTPS for all secured pages - the latter will also protect the session ID you have with the user, which prevents a "hijack". Make sure your database runs on localhost (or your own firewalled private network) only, so isn't accessible to the "outside", and implement a proper set of database users with varying privileges. Basically, give every connection only the privileges it requires to do its job. For users, enforce use of stronger passwords only to prevent dictionary attacks. Consider logging excessive failures from a single IP for investigation (in critical applications, they could be automatically firewalled from the entire network).
You can also use SQL stored procedures to help control what database actions are permitted by users. This is one step the "big boys" take to implement access control in databases. It also improves performance for multi-part queries, and makes injection attacks useless unless they call one of the "permitted" stored procedures (they have the know the procedure names for this to work).
Of course, as mentioned above, how far you go depends on the importance of your data, your budget and the time you can spend on it!
Just some ideas, hope you find that lot useful
-
Milli05 reacted to ElanMan in Help with htaccessThis site is quite a useful read regarding .htaccess -
Milli05 reacted to SniderDK in Help with htaccessRewriteCond %{REQUEST_FILENAME} !-f = if the requested page is not a file
RewriteCond %{REQUEST_FILENAME} !-d = if the requested page is not a directory
RewriteRule ^(.*)$ = ^ means the start of the string, $ means the end... the () defines the capture boundary and the .* means capture all characters
then pass over to domain.com/index.php?q=^(.*)$
[QSA] = Query String Attatch, meaning if i went to domain.com/somepage.htm?var=1 the rewrite will make
domain.com/index.php?q=somepage.htm&var=1
im not so sure on good websites for this as i learn't from a book but hope the above is clear and explains whats going on
-
Milli05 reacted to Biometrx in Help with htaccessHello, it has nothing to do with htacces both your 1st and 2nd problem is related. It seems this is the first time you are using a localhost. are you using wamp, lamp or xammp. Or did you install all of the component of l a m p one by one? Make sure your index.php file is on a folder ou can access. for me, its localhost/joomla. You do not have to change your root directory. As long as you reference a file properly
If you installed a local server successfully, check the documentation to know where to place your files for example, i use wamp and the directory for placing my site is in wamp/www. So if i wanted to install a cms like joomla i will place it in the following directory c:/wamp/www/joomla[joomla here being a folder where my joomla site will sit].
After making sure my wamp server is on, and online i point my browser to localhost/joomla or 127.0.0.1/joomla. this automatically loads the index.php file sitting on that directory.
You should also check your host file and see if you configured it properly.
on my local development server, this is what i placed at the end of my hosts file
127.0.0.1 www.magento.dev magento.dev
Then i configured my httpd-vhost.conf file, you should find it at C:\wamp\bin\apache\apache2.2.8\conf\extra\
at the end of the file add this
<VirtualHost *:80>
ServerAdmin webmaster@project.dev
DocumentRoot "C:\Wamp\www\joomla" [replace this area with the absolute path to your site folder]
ServerName magento.dev [replace www.magento.dev with the url you specified on your host file]
ServerAlias www.magento.dev
ErrorLog "logs/project.dev-error.log"
CustomLog "logs/project.dev-access.log" common
</VirtualHost>
-
Milli05 reacted to Jock in Adding multuple virtual hosts to apache serverI don't know much about apache running on windows but try this...
NameVirtualHost * <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot C:\xampp\xampp\htdocs ServerName localhost <Directory "C:\xampp\xampp\htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot C:\xampp\xampp\testprojects\acm ServerName acm <Directory "C:\xampp\xampp\testprojects\acm"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot C:\xampp\xampp\testprojects\komprador2010 ServerName komprador2010 <Directory "C:\xampp\xampp\testprojects\komprador2010"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>
-
Your not setting the domain hostname, eg, domain.com or ServerName: www.domain.com
-
Milli05 reacted to webdeveloper93 in My Basic php html template system exampleI've attached the zip file to this post but it will basically shows you how to create a basic php template system like PHPBB uses ect..
SimpleTempEngine.zip
-
Milli05 reacted to Jock in problem with iamge uploadsJust a small typo with your form tag, the enctype attribute should be
enctype="multipart/form-data"