Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~5K People Reached
Favorite Tags
Member Avatar for magicmarkuk

Hi I have the following code: $locationcheck = wp_strip_all_tags( get_the_term_list( get_the_ID(), 'project_location', ' ', ' , ', ' ') ); And I want to check if the value of $locationcheck is equal to ">> Online/Remote <<" However, I am getting stuck with the >> and << as it doesn't seems …

Member Avatar for magicmarkuk
0
185
Member Avatar for magicmarkuk

Hi I have a site built on Wordpress which has a over 4,000 posts all with the suffix -2 at the end of the post name (due to me forgetting to clear the trash) before running an import). I would like to remove the -2 from the post names with …

Member Avatar for magicmarkuk
0
279
Member Avatar for magicmarkuk

Hi My error log is showing the following error every five minutes so I suspect it is related to one of my cron jobs, The error is: PHP Notice: Undefined index: HTTP_USER_AGENT in /home/myaccount/public_html/mysite.com/app/config/config.php on line 18 The relevant line 18 is: $_is_hashbang_supported_bot = (strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false); Line 19 …

Member Avatar for LastMitch
0
468
Member Avatar for magicmarkuk

Hi I have the following piece of code: $multiLinks = array(); foreach ( $matches[0] as $k => $match ) { if ( $post->multiurl_token ) { if ( strpos($matches[2][$k], 'http://mysite.com') === false ) { $multiLinks[$matches[2][$k]] = $match.coes[3][$k]; } } else { $multiLinks[$matches[2][$k]] = $matches[3][$k]; } } I want to add an …

Member Avatar for magicmarkuk
0
127
Member Avatar for Albert Pinto

Hi People, Got a small issue...... And don't know exactly where the problem is. I'm trying to implement Online Manga Viewer in my site. I've tried this as a stand alone page and it works fine. What this viewer does is... There is a select box... Where I've got to …

Member Avatar for magicmarkuk
0
175
Member Avatar for magicmarkuk

I have a script that is requires a cron job. The script has the option to run a manual cron job which works fine and the option of seting up an automatic cron job which is where the problem is. The support from the scripts authors is poor as they …

Member Avatar for magicmarkuk
0
671
Member Avatar for magicmarkuk

Hi I have a question regarding the way my site deals with areas that are generated via Javascript not updating to the latest information when using IE9 but working perfectly on FireFox. I appreciate this may be like looking for a needle in a haystack but I would appreciate some …

Member Avatar for Troy III
0
189
Member Avatar for magicmarkuk

Hi I have a script which displays a price but currently is not fixed to 2 decimal places so a price such as $2.50 shows as $2.5 which to me looks wrong. The line of code is `amount += parseFloat($(this).metadata().amount);` Looking around I see there is a function `toFixed()` but …

Member Avatar for Troy III
0
213
Member Avatar for magicmarkuk

Hi I am trying to add a small piece of code to a script to validate two user inputs. 1. Whether a minimum bid is less that 20 - if so show an error; and 2. Check that the maximum bid is higher than the minimum bid - if not …

Member Avatar for phorce
0
167
Member Avatar for magicmarkuk

Hi I am using a script similar to Scriptlance which is using the server time to datestamp everything and display dates and times of the start and end of projects. The problem is that the server is in the US running on PDT time and I am in the UK …

Member Avatar for magicmarkuk
0
244
Member Avatar for magicmarkuk

Hi I am having trouble understanding how the pre_replace function works. I am using a script which has the following line: $ret = preg_replace("#(@|telefone|e-mail|.com|skype|.com.br|fone|www.|hotmail|yahoo|ig|aol|uol|gmail|bol|msn|MSN)#i", "\\1scriptolutionreplacement", $ret); What is happening is that any word with for example the letters ig or uol in it is getting caught. Is there a way …

Member Avatar for magicmarkuk
0
148
Member Avatar for magicmarkuk

I am trying to incorporate a number of small pieces of php code into a Wordpress database (for banner ads). Unfortunately the template I am using is not designed to take php code but rather html or javascript. I wondered if there is a way to amend the template file …

Member Avatar for Biiim
0
140
Member Avatar for magicmarkuk

Hi I am running the following SQL (extract shown below) INSERT INTO users (user_id, username, username_clean) SELECT member_id, username, lower(REPLACE(username, '.', '_')) FROM members The problem arises when lower(REPLACE(username, '.', '_')) produces a duplicate that already exists in username_clean as the users table does not permit duplicates. Is there a …

Member Avatar for pritaeas
0
227
Member Avatar for magicmarkuk

Hi I have imported a number (500+) posts into Wordpress from another CMS (Expression Engine). On a number of posts I have a problem with the way paragraphs are being displayed and I can trace this back to the post data that has been copied across. For example, when the …

Member Avatar for magicmarkuk
0
220
Member Avatar for magicmarkuk

Hello again I have two questions regarding the REPLACE command. The first query I am running is [CODE]update phpbb_posts set post_text = replace(post_text, '[del]', '[ b][ i]') update phpbb_posts set post_text = replace(post_text, '[/del]', '[/i][/b]')[/CODE] Note - in the above code I have had to add a space before the …

Member Avatar for smantscheff
0
271
Member Avatar for magicmarkuk

My final question. I have values which have been serialized into a table forum_polls as are in the following format as shown in the two examples below: [CODE]a:2:{i:0;a:2:{s:6:"answer";s:3:"Yes";s:5:"votes";s:1:"1";}i:1;a:2:{s:6:"answer";s:2:"NO";s:5:"votes";s:1:"2";}}[/CODE] [CODE]a:5:{i:0;a:2:{s:6:"answer";s:2:"CA";s:5:"votes";s:1:"1";}i:1;a:2:{s:6:"answer";s:4:"CIMA";s:5:"votes";s:1:"1";}i:2;a:2:{s:6:"answer";s:4:"ACCA";s:5:"votes";s:1:"0";}i:3;a:2:{s:6:"answer";s:5:"CIPFA";s:5:"votes";s:1:"1";}i:4;a:2:{s:6:"answer";s:24:"MBA(specify in comments)";s:5:"votes";s:1:"1";}}[/CODE] which unsererilized (I cheated and used an online unserializer) give: [CODE]array ( 0 => array ( 'answer' => 'Yes', …

Member Avatar for magicmarkuk
0
166
Member Avatar for magicmarkuk

Hi Apologies if this is not the correct forum for this question. I am running xampp. I have 100+ image files in a directory that I wish to rename. The old filename and the new filename are stored in an mysql database I want to write a routine that will …

Member Avatar for magicmarkuk
0
198
Member Avatar for magicmarkuk

Hi I am now running this query [CODE] SELECT p.topic_id, p.topic_id, p.forum_id, p.author_id + @user_id_jump, p.ip_address, p.topic_date, (SELECT username FROM members WHERE member_id = p.author_id) AS post_username, p.title, p.body, CASE WHEN (SELECT post_id FROM forum_attachments WHERE post.id = p.post_id) != 0 THEN 1 ELSE 0 END AS post_attachment, FROM forum_topics …

Member Avatar for magicmarkuk
0
153
Member Avatar for magicmarkuk

Hi I am having a bad day! I am running an INSERT INTO and SELECT query which is working. One of the SELECT parts is: [CODE](SELECT title FROM exp_forum_topics WHERE topic_id = p.topic_id) AS post_subject,[/CODE] which brings back a title. What I want to do is prefix this title with …

Member Avatar for magicmarkuk
0
134
Member Avatar for magicmarkuk

Hi I am having a problem with my syntax for the following code: What I am trying to do is: 1. Check if sticky = 'y' then give a value of 1 2. If not then check whether announcement is 'y' then give a value of 2 3. If not …

Member Avatar for magicmarkuk
0
157
Member Avatar for magicmarkuk

Hello I wonder if anyone could help me with the following please? I have scratched my head and played around but not been able to move forward. I am creating a script to redirect a user to a random link on my site. The first part of the code extracts …

Member Avatar for simplypixie
0
154
Member Avatar for magicmarkuk

Hi I am new to all of this so please forgive me if my question is either really obvious or indeed in the wrong forum. I have had a script written for me that displays details of books e..t. title, author etc. The string which holds the author seems to …

0
79