Jump to content

Mutley

Members
  • Posts

    765
  • Joined

  • Last visited

Everything posted by Mutley

  1. Same problem, this is really leaving me confused, It executes fine but effects no rows. Searching for the string in fields with %LIKE%, finds all the fields with no issues too. So it can see the fields using this string. What could it be? I really appreciate your help so far guys!
  2. Thanks a lot for your help so far, I just don't get why it won't work, it doesn't bring any errors but it doesn't change any rows. Here is a screenshot of the query executing and the signature field... Signature field...
  3. I just can't get it to work, yes the string is exactly that. Even if I just test it on the example in my first post, it doesn't find this string. I really can't understand why. If I do a search for this string, then it finds the fields no problem, it just won't initiate this replace query.
  4. Thanks a lot QuickOldCar I did a test on 1 member and it ran successfully but effected no rows, I'm guessing that it's not matching with that string correctly but I am not sure why? The backslash to make it parse won't cause any issues would it?
  5. I've just updated my forum software to IPBv4 and it's inserted a paragraph line in the signatures field, so they are really spaced out, I want to search and remove this line from the field. In some instances, there is more than one occurance in the field value. This is the string I want to remove: <p style="text-align:center;"> </p> An example of one members signature in the database: <p style="text-align:center;"><img src="http://i1382.photobucket.com/albums/ah259/maphilli/Axial%20Yeti/Logos/MS%20Banner_zpsfrtm0dpx.jpg" alt="MS%20Banner_zpsfrtm0dpx.jpg"></p> <p style="text-align:center;"> </p> <p style="text-align:center;"><a href="<___base_url___>/topic/199518-zombis-axial-yeti/">My Axial Yeti Build Thread</a></p> <p style="text-align:center;"> </p> <p style="text-align:center;"><a href="<___base_url___>/topic/202762-zombi/">My Sales Feedback Page</a></p> <p style="text-align:center;"> </p> <p style="text-align:center;"><a href="<___base_url___>/forum/167-gowtt/">GOWTT Trailing Group Forum - Derbyshire Peak District</a></p> <p style="text-align:center;"> </p> <p style="text-align:center;"><a href="https://www.facebook.com/pages/Loaded-Ox/437880833003825" rel="external nofollow">Loaded Ox Facebook Page</a></p> I want it to remove the line mentioned, so it looks like this: <p style="text-align:center;"><img src="http://i1382.photobucket.com/albums/ah259/maphilli/Axial%20Yeti/Logos/MS%20Banner_zpsfrtm0dpx.jpg" alt="MS%20Banner_zpsfrtm0dpx.jpg"></p> <p style="text-align:center;"><a href="<___base_url___>/topic/199518-zombis-axial-yeti/">My Axial Yeti Build Thread</a></p> <p style="text-align:center;"><a href="<___base_url___>/topic/202762-zombi/">My Sales Feedback Page</a></p> <p style="text-align:center;"><a href="<___base_url___>/forum/167-gowtt/">GOWTT Trailing Group Forum - Derbyshire Peak District</a></p> <p style="text-align:center;"><a href="https://www.facebook.com/pages/Loaded-Ox/437880833003825" rel="external nofollow">Loaded Ox Facebook Page</a></p> The table is `ipb_core_members`, column `signature` What SQL query can I run? Thanks in advance.
  6. I'm wishing to setup an ecommerce site that is for a distribution company. So need suggestions where I can simply do this: Visitors/guests can see products and product info but not prices or purchase items - it is simply an information site. but People (retailers) with a special login, can see price and suggested RRP As obviously a supplier does not want to show the trade price to the general public. The site doesn't need to have a checkout system, as orders woul Which platform would you recommend to setup this best? Thanks in advance, Nick.
  7. I didn't think cookies were great for a login system though? I thought sessions was the way forward.
  8. I've simply set some sessions.... $_SESSION['LoggedIn'] = 1; $_SESSION['UserID'] = $row["UserID"]; They don't seem to last very long, usually when I close my browser and go back on later, they'll expire. I want them to last permanently unless the user logs out. How do I do this? Thanks in advance.
  9. Not great with JS, this works: onClick="LS(search.value,fetch)" Problem now is... If they hit "return" on their keyboard, I want it to search using the JS, not submit the form.
  10. I have this code: <form action="" method="post"> <div id="map"></div> Please enter an address: <input name="search" id="search" size="40" onKeyPress="if(entered(event)){LS(this.value,fetch)}"> <input type="hidden" name="type" value="<?=$_GET['type']?>"> <input type="text" name="latitude" id="latitude"> <input type="text" name="longitude" id="longitude"> <input type="text" name="zoom" id="zoom"> </form> It works with Google Maps, so it finds the location on the map using javascript. The problem I have, is I want to add 2 buttons. Instead of having to hit 'return' on your keyboard, I'd like 1 button that finds the location using the javascript (so I guess I can alter the onKeyPress to a button or something?). And another button that actually submits the form for PHP. It needs to be in the same form, so the 2 buttons can't conflict. At the moment, adding a submit button, stops the javascript from working, as when you hit return on your keyboard, it submits the form instead of running the javascript, that's why I want 2 separate buttons and remove the pressing return ability. Thanks in advance, Nick.
  11. What's up with this page in IE8? Any ideas? Thanks in advance.
  12. If I have a folder structure like this: > images -> Folder A --> image1.jpg --> image2.jpg -> Folder B --> image1.jpg --> image2.jpg -> Folder C --> image1.jpg --> image2.jpg I'd like to list each folder in the 'images' directory as text, so: Folder A Folder B Folder C I then, when you click on one of the links for say, Folder B, it displays the images inside, image1.jpg and image2.jpg Can anyone provide some code snippets to get me going? I realize a DB would be better for this but I'd like to try this method for just a small site. Thanks in advance. All the best, Nick.
  13. Mutley

    Problem in IE7

    Hmm most of them are url variable problems that IPB generates. I'll look through it, maybe there is a specific error causing it.
  14. What causes this, First view it in Firefox, or IE8: http://www.msuk-forum.co.uk/index.php?app=ccs&module=pages&section=pages&id=17 Then view it in IE7 or IE8 in compatibility mode. As you can see the right hand column gets 'covered over' by a white box. I can't figure out what it is, both the DIV elements in the left main column don't stretch this far out. Any ideas? Thanks in advance.
  15. Thanks regiemon! That's come in handy. I'm having issues with using this .htaccess in subdirectories however, it trys to use the root domain, rather than the subdirectory, for example: mysite.co.uk/test/site/about Trys to goto mysite.co.uk/about I did this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^mysite.co.uk/test/site/([^/]+)/?$ /$1.php Which goes to the correct URL but does a "Not found" error unless I include the *.php extension. Any ideas? Thanks alot and happy holidays!
  16. Yes, sorry you are correct, /servicces/computer-repair/
  17. That was a lot simpler to how I was trying to do it! Thanks alot! Couple of questions, if the URL has a trailing slash, how do I remove the unwanted '>' at the end? And anyway to make each part a URL to that part of the URL... <a href="domain.com">Home</a> > <a href="/services/">Services</a> > <a href="/computer-repair/">Computer Repair</a>
  18. What's a good way to do this? Need some ideas so I don't make an unnecessarily long script. Simply want to convert the URL of a website into breadcrumbs I can echo in the design, all the page URLs are in the same format. mydomain.com/services/computer-repair to Home > Services > Computer Repair There's a few things... 1) Breaking the URL down to sections, not sure what to do here 2) Make first letters Capitals (ucfirst?) 3) Convert Hyphens to Spaces (preg_replace?) Thanks in advance!
  19. Is that just with the spelling corrections? I spotted those and fixed them before. But sadly it didn't work either. I don't know why, it just seems to be dumping PHP at the very top of the page. Even if I don't use a function to do the job.
  20. There is probably a better way of doing this but the problem I'm having is it puts the images at the top of the page (before EVERYTHING else). The PHP is in a loop, so it looks at 5 different strings then echos the image. here's my code ($r['content'] being the string it looks for the image). Funtion: <php> ob_start(); function bm_extract_string($start, $end, $original) { $original = stristr($original, $start); $trimmed = stristr($original, $end); return substr($original, strlen($start), -strlen($trimmed)); } </php> Echo bit (this is in a loop): <php> $content = $r['content']; $pic_string = bm_extract_string("src='","' ",$content); echo '<img src="'.$pic_string.'" />'; </php> Any ideas? I don't think the page code will make much sense as it's IPB3 but here it is: <php> ob_start(); function bm_extract_string($start, $end, $original) { $original = stristr($original, $start); $trimmed = stristr($original, $end); return substr($original, strlen($start), -strlen($trimmed)); } </php> <script type='text/javascript'> Event.observe( window, 'load', function(){ // Resize images $$('.hentry').each( function(elem){ ipb.global.findImgs( $( elem ) ); }); }); </script> <ul class='hfeed'> <if test="is_array( $records ) && count( $records )"> {parse striping="feed_striping"} <foreach loop="$records as $r"> <li style="padding:10px" class='hentry {parse striping="feed_striping"}'> <php> $content = $r['content']; $pic_string = bm_extract_string("src='","' ",$content); echo '<img src="'.$pic_string.'" />'; </php> <a href='{$r['url']}' rel='bookmark' title='{$r['title']}'><h2 style="font-size:24px; font-weight:bold; margin-bottom:0px; border-bottom:1px #284B72 solid; width:100%">{$r['title']}</h2></a> <div style="float:left; padding-top:2px"> <div class="addthis_toolbox addthis_default_style"> <a href="http://www.addthis.com/bookmark.php?v=250&pub=xa-4b08040306d7ea55" class="addthis_button_expanded">Share</a> <span class="addthis_separator">|</span> <a class="addthis_button_digg"></a> <a class="addthis_button_twitter"></a> <a class="addthis_button_reddit"></a> <a class="addthis_button_delicious"></a> <a class="addthis_button_favorites"></a> <a class="addthis_button_print"></a> </div> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4b08040306d7ea55"></script> </div> <span style="float:right; font-size:11px; font-weight:bold; color:#000066"> <img src="files/comments.gif" alt="" /> <a href='{$r['url']}' rel='bookmark' title='{$r['title']}'>{$r['topic_posts']} comment<if test="$r['topic_posts'] > 1">s</if></a> | <b><abbr class="published" title="{parse expression="date( 'c', $r['date'] )"}">{parse date="$r['date']" format="short"}</b></abbr> </span> <br /><br /> <div class='desctext' style="padding-left:25px">{$r['content']} </div> </li> <br /> </foreach> </if> </ul> <br /><br /> Thanks in advance.
  21. This is quite a puzzle, hopefully you can help me out! I'm trying to make a navigational map, here it is: http://tinyurl.com/yhlxs2f It's supposed to be 30x30 square, so if you navigate all the way to one side, it will stop you going any further. So the boundaries are finite. What you see on screen, is a 10x10 AREA of the 30x30 box. The numbers should all be unique AND when you navigate, they should stay in sequence, at the moment, they shuffle. So the 30x30 box of numbers, should never actually move, it's the 10x10 view, that is moving around instead. I believe it's all down to this line that is making the numbers shuffle: $n2=$n+($r*(2*($x_limit+5))); I've attached the file to my post. Thanks in advance, it has being doing my tree in! :'( [attachment deleted by admin]
  22. Wahey, that works! Only problem is with a trailing slash, /contact/ it gets confused with where the images/css files are - probably because it thinks its a folder. Anyway around this? Thanks alot!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.