Everything posted by sergRamalli
-
PHP-form doesn't work anymore?
I think your right it is overkill for a contact form, but because he posted the whole code, i think that in the long term of his site and making improvement it just easier to learn wordpress. I mean unless his in the process of learning , html, css and php. My guess is that wasn't yet if he is then maybe he doesnt need too with something with WP
-
Is it inlcuded
I not using classes, i told you i wasn't and I don't remember saying it wasn't better. This is just a solution until we can redesign the site. But we had to launch, so that's, that. The solution that we are using, seems to working just fine for now. But please remember I was asking a question that was relating to the server workings, not design conventions...or your assumptions if i am or am not using OOP
-
PHP-form doesn't work anymore?
No ones is going to help with this code, because it seems like you dont understand anything about it you cant cut, paste the entire view source of the page.... and expect people to figure it out Dude i recommend wordpress... you install and you get good looking site, works fine. Plus you get add ons , like maps, blogs, contact pages all in a click of a button it takes half a day to learn how to use if you focus https://www.youtube.com/watch?v=0lS6mwsIlVM&index=1&list=PL2FD7E334ADDBD96E
-
Is it inlcuded
A bit harsh? lol I am aware of these things, but my answer to that. Is that the project is way too dependent on word-press and so the design was flawed from the first line (since there wasnt much planning), its too late to do anything now, so we are just trying to manage it until we can migrate to OOD.. But the method of separating the legacy coding style in includes files, seems to be working just fine for the project...if anything its been quite efficient and manageable and we are launching tomorrow. I get that "everyone" is doing autoloading, yet thinking outside the box is not always a bad thing.
-
Is it inlcuded
Dude thanks that good stuff
-
Is it inlcuded
I was a new developer on a project, and convention were not followed after 3 months i got them round to my way of thinking which is OOD. I get that classes are the way forward but as you rightly observed its two 5000 line files, The code is so hard to follow and any changes seems to error the whole site... Rebuilding is not option, as my boss doesn't want this... so i planned out stages to the process. First the includes way im asking about now, then slowing moving towards OOD, OOP and MVC, with time.. So ..to make this 5000 file more manageable, then to comment and understand each line, install conventions, design the new program and implement OOD, But think this needs to done, while the site is live and features are being added.. this include way is my only option as i can see
-
Is it inlcuded
And the reason why? and whats the alternative you recommend?
-
Is it inlcuded
<?php function sergio (){ return 'something'; } function sergio2 (){ echo 'Something'; } sergio2(); sergio(); depends if you use return or echo In the above example you will not get an echo from sergio(); I done research and try to conduct a tests. And yes it would appear that it doesnt.. but i wanted to make triple sure, before i undertook a project with two 5000 line function files. Maybe there is a better way of then the includes within a function
-
Is it inlcuded
Have a simple question If a file is included within a function but the function is not called will the file be included in this example below will test.php be complied by the server since it is not called.. function sergio (){ include ('index.php'); } function sergio2 (){ include ('test.php'); } echo sergio();
- Javascript Url Self
-
Javascript Url Self
Heres the code first var options = { pageUrl: function(type, page, current){ return "portuguesegoods.com/theaquaponicist/gallery/index.php?type=blog&page="+page; } } What i need is for the is to get the url dynamically on each page where the code would be place But i only need portuguesegoods.com/theaquaponicist/gallery/index.php?type=blog; and not portuguesegoods.com/theaquaponicist/gallery/index.php?type=blog&page="+page; notes** The landing page or the page one will not have $_get variable so there will be no "+page on it but other pages will Note also the front link changes so it can be portuguesegoods.com/theaquaponicist/NEWS(***)/index.php?type=news&page="+page; or a who different domain how is this done? Thanks for your time
-
How to display record from database in modal bootstrap
I was working on this like three days ago!! lol Heres my code This works on bootstrap v2.3 make sure to include add the correct bootstrap files ///////////////////////////// The code /////////////////////////////// ** where is says event add the link to the file where your php/json/etc.. is i this example its event.php <script type="text/javascript"> $(function(){ $(document).on('click', '.edit-record', function(e){ e.preventDefault(); $(".modal-div").html(''); $(".modal-div").addClass('loader'); $("#dialog-example").modal('show'); $.post('event.php', {id: $(this).attr('data-id') }, function(html){ $(".modal-div").removeClass('loader'); $(".modal-div").html(html); } ); }); }); </script> //////the link that sets off the event $id = add your variable here <a href="#" class="edit-record" data-id="'.$id.'">Placeholder text</a>.' ///event.php **this where you add your dynamic logic, from the post variable posted above <?php echo ' <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"><div class="te">'.$_POST['id'].'Excitavit hic ardor milites per municipia plurima, quae isdem conterminant, dispositos et castella, sed quisque serpentes latius pro viribus repellere moliens, nunc globis confertos, aliquotiens et dispersos multitudine superabatur ingenti, quae nata et educata inter editos recurvosque ambitus montium eos ut loca plana persultat et mollia, missilibus obvios eminus lacessens et ululatu truci perterrens.</div></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Book event</button> </div> </div>'; ?>
-
google maps advice
The project Im going to be starting a google maps project. It basically going be a list of a specific businesses, whose location is then placed into Google maps and who business is listed on the side of the map itself for further reference and navigation (much like the current/recently previous version of google maps ) The question I have worked with the Google API before, but i would still say im an novice, and would appreciate any tips and advice from anyone at any level of experience who has worked with Google maps before. answer to question like j.son vs mysql is kinda what im asking for, but i wanted to it be vague and open ended in the hopes to learn something new and unexpected that could help.. thank you
-
Inserting Google Analytics via PHP.
maybe php file isnt in the right directory i.e it could be include "../bah.php" or from what you said from the quote, you might of added an extra " or ' where there shouldn't be one before the php include but without any of the code, how can we debug?
-
changing page url without refreshing page
Ok thanks alot for pointing me in the right direction!! But you guessed it! how would i take the url in real time back from the url?
-
changing page url without refreshing page
On Google translate, when you type into the the text div, the text appears in the url without the page reloading.. How is this done?
-
Any online tutorials creating Message boards from scratch?
If memory serves me well, he didnt use tables for the one i linked.. And his aim is not repeat material thats why i think he goes for the tables sometimes There is separate stuff to style in css (and there is some good videos on css transitions). Personally speaking i get what your saying about the PDO, but as discussed in a previous thread its not the first step when learning scripting/programming for the first time. The person who posted the question is a beginner. For beginners somewhere like developphp.com is perfect. Has adam explains everything clearly and allows the person watching to understand key concepts and why and how you would do it If the want to become good and master things, then they will need to go a night courses, find other material online, get some good books online etc.. its not going to help you become a web-guru And again personally speaking, adams courses help me over the last year and half, get the basics for scripting and programming and now learnt PDO, how to build eCommerce solutions and and cross domain CMS. also im improving security, User interfaces and trying to make a framework of my own that would allow multiple developers to use..but again my first step was developphp.com
-
Any online tutorials creating Message boards from scratch?
...ok citypaul ill bite, could you expand and tell me why you dont like it?? because its not written in PDO... security issue?
-
Learning PHP functions
The problem you speak of seems somewhat of a non problem.. I appreciate that the w3 isn't the sole authority of the web and programming, but to discredit completely because they dont update frequently enough is exaggerated issue and a waste of time. In 99.9% of cases using w3 will provide you with the ground work of what you need.
-
Inventory Database
Nah dude, i know what you need trust on this http://www.developphp.com/list_php_video.php#E__Commerce_Website_Tutorial_Admin_Shopping_Cart_PayPal Go onto that website and click the video, its for a e-commerce solution but you only need videos 1 to 8 if you do those videos you should be able to answer every question with a solution you just asked.. Personally you dont need to understand the code, just follow instructions and download the package which you can find on the last video, keep what you need and what delete you dont. and you should have a simple inventory system within a day or two!! P.S You will need a server
-
problems using get over mulitple files
You could also hide the form ie the is the form page logic <?php if (!isset($_GET['something'])){ show checkbox (that will select form) }else if($_GET['something'] == true){ show form one with the varible you need i.e action is =search.php }else if($_GET['something'] != true){ error or show form two etc... } ?> p.s research javascript onclick submit event, maybe that might help
-
problems using get over mulitple files
You seem to be very confused, what your trying to do would be better done using ajax.. But if your not on ajax level yet (which im guessing your not, No offence) then i think that maybe you need to take a step back and look at the logic again <form class="indexSearch" action="<?php echo $indexSearchFormAction; ?>" <----- This shouldn't be an empty variable when you first hit the page. I.E this code personally makes no sense to me, unless i did something with ajax.. but heres what i would do <form class="indexSearch" action="the_php_page.php" method="get"> Then on the the the_php_page.php i would have if conditions that handle different solutions For example if(checkbox one is select true){ do this }else{ do something else } example two if(isset($_GET[checkboxone])){ do this }else{ do something else } But alternatively if you wanted a solution before they hit the first page, then look at sessions and cookies, but i wouldnt recommend this
- Access images from public folder
-
Any online tutorials creating Message boards from scratch?
The core elements are the same, is just from personal experience i found more help with social networking sites.. like the link above, if he follows it plus the addons that can be found from other contributors, you will have himself message board (kinda) and then some.
-
Responsive design for browsers without JavaScript
I never said learn bootstrap and then go live a in cave.. lol But if i was taking up a new project i would just use their framework, as there is a large community, investment behind it from twitter, many design solutions online, many available templates and not to mention the convenient plug-ins & icons etc... But converting a website to a responsive design, is no easy task either.. the question there is which one would require less work than the other right? or would it be less painful in the long run to convert them to a bootstrap. And if you have more than one designer working on your team, would it be easier to have them learn the simple bootstrap responsive design system or to explain how you put together each individual website (or have them figure it out for themselves)? dont get me wrong if there were only a few design tweets then why brother with a framework.. but i honestly must argue the bootstrap camp as in the long run (talking years and months) it would mean less work