Search the Community
Showing results for tags 'help'.
-
Hi, I have pre-written code that produces a license key but I don’t like the format that the key is in and was wondering if I could get some help fixing it? This is the code @section('scripts') <script type="text/javascript"> function Createkey(length) { var result = ''; var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; var charactersLength = characters.length; for ( var i = 0; i < length; i++ ) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } $('#licenses-gen').click(function(){ var GetType = $('#type_of_key_id').find(":selected").text(); $('#licence').val(GetType.trim()+Createkey(18)); }); </script> @endsection the output is just a random string of 18 characters like: H3CJPE5JMS501FH52A though I want to get an output like: FSOWP-DHJEO-SKJ3D-2DF5R-3FG51 What can I change in the code to get the second output option?
-
I have a customer, using a WP website. They are currently using Google Tag Manager for the tracking code (active campaign) on the website rather than the recommended script. This is not working, the analytics are not being populated. They can;t add the global site tag because it interferes with the dataLayer. Is there a way to customise the scrip that they are currently using? The customer has Google Analytics already installed on the current AAF website https://affordableartfair.com/ (published via Google Tag Manager). They have said that it won't be possible to add the Gtag (global site tag) tracking as it interferes with the data on the page (dataLayer) and can cause major issues / may well not work as expected. As such we'll need to publish the Active Campaign scripts via a Custom HTML code tag OR a built in template. This is what we have on the AAF website at present: * image attached On AC Directly is this tracking code: <script type="text/javascript"> (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};e[e.visitorGlobalObjectAlias].l=(new Date).getTime();r=t.createElement("script");r.src=o;r.async=true;i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo"); vgo('setAccount', '223643323'); vgo('setTrackByDefault', true); vgo('process'); </script>
-
Hello everyone im new here and im very happy that i found smth good here (just a think). im trying to create alphabetic power search module for joomla my web test is this ->http://vps365826.ovh.net/index.php/africa as you can see the alhabetic line ( A B C D E G I K L M N R S T U Z ) as you see some words missing well thats cause i dont have articles with words ex (F) photo ex. ( http://prntscr.com/e9j9iu ) well i want to create it with all alphabetic words even if we dont have article with that word i've created with my friend that code <div class="ordered"> <ul> <?php $db = JFactory::getDBO(); $query = 'SELECT count(*) as nm, SUBSTR(title,1,1) as alpha FROM #__content WHERE catid = '.$catid.' GROUP BY SUBSTR(title,1,1)'; $db->setQuery($query); $mostIng = $db->loadObjectList(); foreach ($mostIng as $row) { echo '<li data-text="'.$row->alpha.'">'.$row->alpha.' '.'</li>'; } ?> </ul> </div> but i want it somethink like that <div class="ordered"> <ul> <li class="orderedLabel closed">Αναζήτηση αλφαβητικά ></li> <li>A</li> <li>B</li> <li>C</li> <li>D</li> <li>E</li> <li>F</li> <li>G</li> <li>H</li> <li>I</li> <li>J</li> <li>K</li> <li>L</li> <li>M</li> <li>N</li> <li>O</li> <li>P</li> <li>Q</li> <li>R</li> <li>S</li> <li>T</li> <li>U</li> <li>V</li> <li>W</li> <li>X</li> <li>Y</li> <li>Z</li> </ul> </div> well thanks for your time and sorry for my bad english im trying to learing btw thank you very much!!!
-
i want to display 'Welcome userid!' after user has successfully logged in. I managed to display it after successfully logged in, but when the user key in the wrong userid and password, the 'Welcome userid' is also displayed. What should i do about it? Below are my coding: login.html processLogin.php index.html
-
My sign in code called activation is the script called activation.php. my login page is login.php and my profile page is the landing page once a successful login in attempt is made. the activation.php is the issue as i us the form in sign.php to login but the activation.php doesn't redirect me to the sign in page once a fail attempt is made or it doesn't redirect me to my profile page once a successful login in attempt is made. The following link has the code:https://gist.github.com/confusedstudent21/410f04991691f485e6c28d1e4050e13a where is it going wrong?
-
Hi guys , i am really stuck here .. i am not a php programmer and got a script from a friend to open a link random on click anywhere on site .. this script works great but it only opens a link once a day , i need it to open a link every time the users clicks on the site. i googled a lot and fount that it is the cookie settings , only in all tutorials online they talk about setting cookie time on 0 ... this option is not written in the script i have and there is a tag made , new_Date i can not find any info on those tags like new day , and changing it to 0 breaks the script. does somebody know how to change this script so it works on every click on the site. this script is needed for affiliate links and i need it to open every time someone clicks on something on the site without time delay or a time delay from 1 minute for the main page. but most importent is the code without time delay . if someone wants to help i'll be very thankful course googling is not going to solve this for me .. Thanks the script :::: <script> var puShown = false; var PopWidth = 1370; var PopHeight = 800; var PopFocus = 0; var _Top = null; function GetWindowHeight() { var myHeight = 0; if( typeof( _Top.window.innerHeight ) == 'number' ) { myHeight = _Top.window.innerHeight; } else if( _Top.document.documentElement && _Top.document.documentElement.clientHeight ) { myHeight = _Top.document.documentElement.clientHeight; } else if( _Top.document.body && _Top.document.body.clientHeight ) { myHeight = _Top.document.body.clientHeight; } return myHeight; } function GetWindowWidth() { var myWidth = 0; if( typeof( _Top.window.innerWidth ) == 'number' ) { myWidth = _Top.window.innerWidth; } else if( _Top.document.documentElement && _Top.document.documentElement.clientWidth ) { myWidth = _Top.document.documentElement.clientWidth; } else if( _Top.document.body && _Top.document.body.clientWidth ) { myWidth = _Top.document.body.clientWidth; } return myWidth; } function GetWindowTop() { return (_Top.window.screenTop != undefined) ? _Top.window.screenTop : _Top.window.screenY; } function GetWindowLeft() { return (_Top.window.screenLeft != undefined) ? _Top.window.screenLeft : _Top.window.screenX; } function doOpen(url) { var popURL = "about:blank" var popID = "ad_" + Math.floor(89999999*Math.random()+10000000); var pxLeft = 0; var pxTop = 0; pxLeft = (GetWindowLeft() + (GetWindowWidth() / 2) - (PopWidth / 2)); pxTop = (GetWindowTop() + (GetWindowHeight() / 2) - (PopHeight / 2)); if ( puShown == true ) { return true; } var PopWin=_Top.window.open(popURL,popID,'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,top=' + pxTop + ',left=' + pxLeft + ',width=' + PopWidth + ',height=' + PopHeight); if (PopWin) { puShown = true; if (PopFocus == 0) { PopWin.blur(); if (navigator.userAgent.toLowerCase().indexOf("applewebkit") > -1) { _Top.window.blur(); _Top.window.focus(); } } PopWin.Init = function(e) { with (e) { Params = e.Params; Main = function(){ if (typeof window.mozPaintCount != "undefined") { var x = window.open("about:blank"); x.close(); } var popURL = Params.PopURL; try { opener.window.focus(); } catch (err) { } window.location = popURL; } Main(); } }; PopWin.Params = { PopURL: url } PopWin.Init(PopWin); } return PopWin; } function setCookie(name, value, time) { var expires = new Date(); expires.setTime( expires.getTime() + time ); document.cookie = name + '=' + value + '; path=/;' + '; expires=' + expires.toGMTString() ; } function getCookie(name) { var cookies = document.cookie.toString().split('; '); var cookie, c_name, c_value; for (var n=0; n<cookies.length; n++) { cookie = cookies[n].split('='); c_name = cookie[0]; c_value = cookie[1]; if ( c_name == name ) { return c_value; } } return null; } function initPu() { _Top = self; if (top != self) { try { if (top.document.location.toString()) _Top = top; } catch(err) { } } if ( document.attachEvent ) { document.attachEvent( 'onclick', checkTarget ); } else if ( document.addEventListener ) { document.addEventListener( 'click', checkTarget, false ); } } function checkTarget(e) { if ( !getCookie('popundr') ) { var e = e || window.event; var win = doOpen('http://yourlinkurl.url/bannerpage.phphtml'); setCookie('popundr', 1, 24*60*60*1000); } } initPu(); </script>
-
Hi Everyone, I am currently building a new website and the last big thing I need to finish is the PHP handling the forms we have built. Whenever I go to the page and submit the form, it seems to get into a never ending loop. I am not sure if the problem is in the code or if it is server side. Any assistance would be appreciated. I do not have much experience with PHP at all. I am going to attach the code below. The first file will contain the form and the second will be the PHP. Again, thank you for any suggestions you can provide. I am hoping the solution is simple. If I need to provide more information, let me know. form.html requestdemo.php
-
hi this php script is not working for me. just wont create tbles. here is the db php code. not my database details these are default ones
-
Hei everyone. i need a solution to find : When any one clicks on any ad network banner that i place on site after a click on banner i want it to hide / remove. I need this so wont have multiple ad clicks and prevent being banned If some one can help me with the code how to make for example adhitz banner after a click made by that visitor to get hidden. I dont need a function on a simple click anywhere on page. I need when banner clicked to get hidden after the click is made on it.
-
Can anyone help me with this? i´m trying to install a autoresponder on my website and after i run the installer i get this message and not the login page. Any suggestions? Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/awsomesuperfoods/public_html/responder/application/libraries/admin_controller.php:15) Filename: core/MY_Controller.php(1) : eval()'d code(3) : eval()'d code Line Number: 16
-
I am having trouble with $this in a class file. Here's my code: function getId() { return $this->cust_id; } function update($vars, &$errors, $location_number=0, $mass=true){ return $this->save($this->getId(), $vars, $errors, $location_number, $mass )?true:false; } function save( $id, $vars, &$errors, $location_number, $mass){ echo 'now'; } [/] I know there is no customer id, as this is a new client but this is how the code was before and it was working. However, even if I pass a 0 for the customer id and do this: [code] function update($vars, &$errors, $location_number=0, $mass=true){ return $this->save(0, $vars, $errors, $location_number, $mass )?true:false; } [./] It still fails to call the save function. I have to do the following: [code] function update($vars, &$errors, $location_number=0, $mass=true){ return Cust::save(0, $vars, $errors, $location_number, $mass )?true:false; } [/] even though I am already in the Cust class. What is wrong?
-
I have a span that is only supposed to show if the user is an admin. The code works fine on the current system but I'm trying to upgrade to a newer system. Here is the code: <div class="note ui-corner-top"> <h4 class="ui-corner-top"> <?=Format::daydatetime($note[created])?> - posted by <?=$note[staff]?> <span id='link_<?=$note[noteID]?>' style='float:right;padding-right:10px;'> <span id='sEdit'><a href='javascript:makeEditable("<?=$note[noteID]?>", "Edit", "customer_note")'>Edit</a></span> <?if($thisstaff->isAdmin()){?> <span id='sDelete'> \ <a href='javascript:makeEditable("<?=$note[noteID]?>", "Delete", "customer_note")'>Delete</a></span> <?}?> <span id='customer_note_save_link_<?=$note[noteID]?>' style='display:none'><a href='javascript:makeEditable("<?=$note[noteID]?>", "Save", "customer_note")'>Save</a></span> <span id='customer_note_cancel_link_<?=$note[noteID]?>' style='display:none'> \ <a href='javascript:makeEditable("<?=$note[noteID]?>", "Cancel", "customer_note")'>Cancel</a> < /span> </span> </h4> </div> [/] This is displaying "Edit isAdmin()){?> \ Delete" When I delete this line of code: [code] <?if($thisstaff->isAdmin()){?> [/] I get "Edit / Delete" which is exactly what I want but then it always displays even when the user isn't an admin. I'm assuming I'm missing something very simple here, like an apostrophe or something but I can't figure it out.
-
We can create .php files every time I click on it will check to Simple "E: /e.txt" and read inside it and create / wirte to print .php file hosting We can create .php files every time I click on it will check to Simple "E: /e.txt" and read inside it and create / wirte to print .php file hosting?? , please help
-
Can anyone provide their method of getting the results to show as a table as the results it showing now is an unreadable mess, I'd also like the following css styling as follows: Padding: 20px Border: 1px solid grey th to be in light grey Id be greatfull if someone could put the code into a table as its driving me nuts lol Here is the code for showing the results: $sql = "SELECT animal_type, animal_breed, colour, owner_name, address, telephone, mobile, email, offence, offence_date, offence_location, case_status, case_ref, action_required, action_taken, microchipped, microchip_number, aggressive, dangerous, lost, date_lost, location_lost, stolen, date_stolen, location_stolen, found, date_found, location_found, other_information FROM `animals` WHERE 1"; $result = $conn->query($sql); if ($result->num_rows > 0){ while($row = $result->fetch_assoc() ){ echo $row["animal_type"]." ".$row["animal_breed"]." ".$row["colour"]." ".$row["owner_name"]." ".$row["address"]." ".$row["mobile"]." ".$row["email"]." ".$row["offence"]." ".$row["offence_date"]." ".$row["offence_location"]." ".$row["case_status"]." ".$row["case_ref"]." ".$row["action_required"]." ".$row["action_taken"]." ".$row["microchipped"]." ".$row["microchip_number"]." ".$row["aggressive"]." ".$row["dangerous"]." ".$row["lost"]." ".$row["date_lost"]." ".$row["location_lost"]." ".$row["stolen"]." ".$row["date_stolen"]." ".$row["location_stolen"]." ".$row["found"]." ".$row["date_found"]." ".$row["location_found"]." ".$row["other_information"]."<br>"; } } else { echo "0 records"; }