ldragon's Activity Stream: Page 1 of 2 « FIRST  ‹ PREV  NEXT ›  LAST »

» Multiboxing in World of Warcraft rocks  ...  Last Reply: 3 months ago by Tyme.

Thats pretty nuts actually, love the response. utter dejection.

What instance you going to run? Should be fun, I dont have the money to even attempt such a feat :P

» World of World of Warcraft  ...  Last Reply: 3 months ago by ldragon.

Brilliant :P

» Related post plugin?  ...  Last Reply: 4 months ago by ldragon.

Thing about tags is there could be multiple tags per post, so how should the system decided which tag to use to get related posts?

But I've tried to come up with something, keep in mind this with version 2.5+ . Whilst you're in the loop for the single post, put this bit of code in there somewhere:

$tags = get_the_tags();
$related_tag = array_shift($tags);
?>

$related_tag is now an object which contains information on the first tag of the post.

Now what you do is setting up a query_posts function using the tag information wherever you want the related posts to appear. query_posts does act funny sometimes, so this may not work, but I've tested it and it worked on by system. Anyway, you need to put this code in:

$str = 'tag='.$related_tag->name;
$str.= '&showposts=5';
query_posts($str);
while(have_posts()) { the_post();
### loop things in here e.g. the_title(), the_content()
}
?>

The string we send to the function read like this: tag=cooking&showposts=5. So this finds posts matched to that tag and returns the first first.

If you do have multiple tags, you can make the function search for 'posts with any of these tags', but the query you send to the function is slightly different:

$str = 'tag=';
foreach($array as $tag)
{
$str .= $tag->name.',';
}
$str = substr($str,0,-1);
$str.= '&showposts=5';
query_posts($str);
while(have_posts()) { the_post();
### loop things in here
}
?>

This loops through each format and write the query string like this: tag=bread,butter,jam&showposts=5.

In theory this should work. There are other functions to look for posts with, which I tend to use, such as get_posts() and the WP_Query object, but you can search for tags using them.

If you need to put other parameters into the function, this page tells all about the parameters.

Hope that works, and helps :)

» Related post plugin?  ...  Last Reply: 4 months ago by ldragon.

Yeah I think the use of custom fields would be needed, since how are you going to assign a thumbnail to a post? Also, how are the related posts determined, by category, tag etc. I can try and give you a hand if I can get this information.

» Favourite Funny Quotes  ...  Last Reply: 4 months ago by Clarkey.

I do like children. But I couldn't eat a whole one.

» Facebook Chat  ...  Last Reply: 4 months ago by RightOn.

Its pretty cool but I tend to open a lot of tabs while on Facebook and im pretty convinced that its crashing my browser :P

Nice article Scrivs, just reading it now

» Super Smash Brothers Brawl  ...  Last Reply: 4 months ago by Scrivs.

Gah have to wait even longer for it to come out over here in Europe :( but then I shall unleash Falcon Fury, you have been noted :P

» Favourite Sci-fi and/or Fantasy Authors  ...  Last Reply: 4 months ago by Nils.

Ah, how could I forget Herbert and K. Dick, love their stuff as well. Is there no edit button on here or something?

6

Favourite Sci-fi and/or Fantasy Authors

Writing Community — Posted: May. 22, 2008  ...   Last By: Nils @ 4 months ago

I know this question is pretty loaded and over-used, but I've always stuck to my few authors, on really venturing beyond them on recommendation. My reading piles are pretty small at the moment, having polished off a good few books recently, so I'd like to see the authors you all come up with :)

For me, my favourite author of the moment has to be one Iain Banks. I've read almost all of his books, including his short story collection, and his ability to bring something original to the genre is unparalled, judging from the other stuff I've read in my young years. Also, for different reasons, Douglas Adams' books are never a dull read :).

In terms of fantasy, even though I don't read a lot of it, I've recently taken to the epics of Terry Goodkind, read about 3 of his books now, completely engrossing, lost a few good afternoons to them. And of course Terry Pratchett's Discworld is always fun. Joe Abercrombie is someone I've had my eye on recently, I've read most of his books, he gots a very natural gift for weaving a raw, powerful story. I particularly liked Before They Are Hanged, part 2 of the First Law Trilogy, gobbled that up in no time. (Incidentally, just realized the last book is out, just ordered it off Amazon :p)

All contributions are welcome :)

Didnt realise there was no Books category, so I put this in the writing section for now :P

» Adventures In Type  ...  Last Reply: 4 months ago by shadowsun7.

That last book looks quite interesting, I'll slap that on my reading list :)

» What is your favorite sport?  ...  Last Reply: 4 months ago by Scrivs.

Rugby Rugby Rugby Rugby Rugby Rugby Rugby Rugby Rugby.

Hope I was clear there. Love the game, the comraderie, the culture, the violence, the skill, the event. Brilliant.

» Amazing Hillary Clinton Impression  ...  Last Reply: 4 months ago by shadowsun7.

That's terrifying!!! Good find though

1

Decompressing (p,a,c,k,e,d) Javascript Files

Programming Community — Posted: May. 7, 2008  ...   Last By: Mike @ 5 months ago

Now, I know why most people compress they're js files, because they don't won't people to steal the code, but it must be the case that sometimes, like what happened to me today, you've just gotta crack that encryption. I'm a bit worried about posting this, so I hope it's in someway new and/or useful.

Basically we need to go into a js file that was given to us, in order to change a few DOM-based functions. I opened up the file, and lo and behold, this was the first few characters...

eval(function(p,a,c,k,e,d){...

This is the trademark sign of the packer by Dean Edwards. I'd seen this a few more times, and used it myself too, but never had to decode it before. So I did a little searching and found a nice method of decoding it:

  1. Use the bookmarklet found here whilst on the packer encode/decode page. This will enable the decode button and remove the read-only limitation on the bottom text area.
  2. Paste your encoded code into the bottom textarea and press decode. In theory, you should get the original code, but without line breaks, whitespace etc.
  3. To put the whitespace back in, I used 'Javascript Tidy'. Whilst not 100% successful (depends on your browser it seems somewhat), is did tidy up the majority of the code.

So yeah, that's how to decode the p,a,c,k,e,r compressor. Hope this is useful :)

» Gnewbie...  ...  Last Reply: 4 months ago by katelynjane.

Welcome friend :)

» CSS Frameworks?  ...  Last Reply: 4 months ago by Scrivs.

KISS indeed :)

I use a very simple framework, just a few classes I use in every document:

  • Floating left and right, and a clear:both class
  • Text-align left and right
  • Widths of 20%,25%,40%,50%,60%,75%,80%
  • Padding div, which I put inside divs width a width to stop the whole box model being different in different browsers

On top of that, I tend to have empty statements for body, a and p elements, and h1-h6 too.

Just so you all know ;)

» CSS or XHTML Validation: If you had a choice  ...  Last Reply: 5 months ago by lalindsey.

Thanks mate :) That Coda feature you mentioned last sounds pretty fantastic, wish they'd just release it on Windows so i don't have to set up a dual-boot system on my new laptop :(

I'm a firm believer that, by focusing on your core markup, and debugging at the core before diving into a hacked solution is the best and easily possible way. It all comes down to whether or not you have the gumption to wade through the wrappers and the css to find the bug. I'm also a firm believer that no hacks are possible on many many layouts.

Well said. We have a few problems with that at work on our current project. The main bugs we were having were floating and using absolute and relative. The biggest issue we always come across is double side margins on floating elements in IE6. Now we can either do it as normal, and add a hack, or add an extra div with padding but no width, the width coming from the inner div.

When it comes to hacks in CSS, it's a choice: either add the hack, or add extra markup to get round it. Both methods have pros and cons, so it's the developer's choice.

10

CSS or XHTML Validation: If you had a choice

Design Community — Posted: Apr. 30, 2008  ...   Last By: lalindsey @ 5 months ago

Hey people :) just been discussing this with my mates at work:

"Concerning all the websites you've ever made and are ever going to make, consider this: If you had to make sure that the site in question was 100% valid in either CSS2 or XHTML in order to finish, what would you choose?"

Personally, I'd probably stick with the XHTML validation, since I reckon this is more important overall i.e. for screen-readers, usability/accessibility issues.

Your thoughts?

» GUYS...WHAT TURNS YOU ON?  ...  Last Reply: 5 months ago by ldragon.

Being a geek.

Probably the number one reasons for me to be interested is finding out that they know more than they are letting on. They don't just understand what they are saying, they are curious and adventurous enough to know and try out more.

Just yes, spot on.

For me, a funny girl who gets my sly, subtle jokes is always enticing, but in terms of physical features, its the eyes (my girlfriend has gorgeous ice blue ones) and an athletic lower half, nice bum and legs :)

» What OS shopping cart?  ...  Last Reply: 5 months ago by bobstanley.

I just installed Magento on a local server. WOAH!!!! Thats is an impressive piece of work it has to be said, we've been using digiSHOP since we have a reseller license, so we're gonna try and implement Magneto on the new shopping cart we can do. Unfortunately the examples are few and far between at the moment :( let's step on it guys!!

» 1-18-08/Cloverfield  ...  Last Reply: 5 months ago by Space.

More New Yorkers, every disaster movie has them in it :( Was a shithot movie, bit short, but awesome none the less.

» Are you really satisfied?  ...  Last Reply: 5 months ago by maritza.

I have pretty dark moments sometimes, but then I step back and look at things objectively, realize my life is sweet, got a nice job, a lovely gf, great friends, going to Uni next year, etc.

What really helped was just going to India, as everyone always says who go on these trips, but even before that, you just gotta go with the flow. Im not a religious guy, Im a scientist/analyst, so ultimately I know theres little hope for me since my time on Earth will mean null in the grand scale of things, but thats a bummer, so I just want to use what I've been given to have a good time and help everyone else to have a good time with me. As corny as it sounds (dont slam me for this), and I know Im not the first to say this, but i define myself through the quality of the connections I have with people, because the only constant in our world is comraderie and love.

So yeah, I'm satisfied.

» What Browser Do You Use?  ...  Last Reply: 5 months ago by dubsar.

At the moment using Firefox for browsing, Opera for feeds and web galleries sites (love that speed dial) and IE for constructive swearing. Yum.

» Indestructo Tank AE  ...  Last Reply: 5 months ago by ldragon.

That's quite cool :) Only had 5 mins to play it just now, but I've bookmarked it to try more of later. Thanks.

» Internet World 2008  ...  Last Reply: 5 months ago by creativeaccess.

Just a thought thought with my 'tree hugging' hat on... shouldn't an expo called 'Internet World' issue it's visitor passes via email and allow the visitor to print them off if needed rather than paper post?

Does sound more marketing now ... im a bit put off by it now. We'll get out sales guy to go :)

» Internet World 2008  ...  Last Reply: 5 months ago by creativeaccess.

Been thinking about it too, we've got the leaflets at work, I'll bring it up in the monday morning meeting, liven things up a bit.

» Gaming sales up 57%  ...  Last Reply: 4 months ago by Scrivs.

The Wii is the ultimate small party tool, people will come over just to play.

And yeah, going out is getting more expensive too, it's just hardly worth the money if there's a lot of you, stay and chill with Wii Sports and other games :) And i agree with Ozone, it will be interesting to see where this all leads.

» Calling all PHP Gurus! Complex problem inside!  ...  Last Reply: 5 months ago by ldragon.

Wow thanks for that stuff Oli, never delved into regex much so far, that's helped me a lot. To be fair to this client she is our biggest job in years, so we're pulling out all the stops.

» Calling all PHP Gurus! Complex problem inside!  ...  Last Reply: 5 months ago by ldragon.

The responses I feared :( Ah well, thanks for the input, might try using Regex, event if I can get the values out it will be a GREAT SUCCESS!

Think I might just say to her 'Do it yourself love!'. At least I wasn't alone in thinking the whole idea is bonkers.

» Calling all PHP Gurus! Complex problem inside!  ...  Last Reply: 5 months ago by ldragon.

Don't think I've explained myself very well, the field in question will contain text, be it lists, paragraphs, anything, it's not feesible to say 'special offers prices here' since there will be text accompanying it, and there may not be any prices. It's just if there is, they need to be converted on the fly. Some properties do not have special offers, then this field left blank.

The function needs to go into the text and find any occurences of a price in $ and convert it to £. The rate is defined elsewhere, thats done and dusted.

9

Calling all PHP Gurus! Complex problem inside!

Programming Community — Posted: Apr. 16, 2008  ...   Last By: ldragon @ 5 months ago

There, that got you attention.

I've got a (annoying) client that I'm making a Caribbean property website. She has the functionality to manage the $ to £ and $ to Euro conversion rates, and she only enters the prices in $ in the admin. For the normal pricing section this isn't a problem, since there are individual fields, so conversion is easy.

The problem is the special offers part for each property, since this has to be text so she can be whatever she wants in these fields. But she is insisting on entering the price in $ but wants them to appear in £ on the front-end.

See why she's annoying? I've been looking at the PHP functions such as strpos, strstr, str_replace trying to find a way to automate this.

Basically I'm trying to develop a function that takes a string input and converts all $ prices into £ Sterling. Any ideas would be appreciated, since you're such a helpful lot :)

Here's an example of the type of text in there (I'm moving it all from an older ASP .NET site):

Special Offer:
SPRING SALE

Book before 30 April for travel between 01 March - 31 July 2008.

01-30 April
Standard room £93.00
Deluxe Pool/Gdn View £102.00
Superior Dlxe Pool/Gdn £110.00

1 -31 May
Standard room £85.00
Deluxe Pool/Gdn View £93.00
Superior Dlxe Pool/Gdn £102.00

1 June-31 July
Standard room £80.00
Deluxe Pool/Gdn View £87.00
Superior Dlxe Pool/Gdn £97.00

All prices are per person per night.

» Need help: Mozilla I love, IE drives me crazy...  ...  Last Reply: 5 months ago by ldragon.

Hmm well I can confirm for you definitely does not work on my IE7 either :(

Not very familiar with the and tags, but I think the problem might be on this line:

I don't reckon there's an attribute called blog.littlerockjams :)

Try re-copying the code, because that < bit is code for < right?, maybe it should be more like:

Or maybe that image shouldn't have been there at all, and the classid attribute should match something else/

Hope I've hit on something here :) good luck.

Edit: The code bit of this editor doesnt like me, not showing up the way it should, so view the source at Line 512 here to see what i meant.

» Examples of Grunge Design?  ...  Last Reply: 5 months ago by ldragon.

Here's a good article to read from Smashing Magazine, The Secrets of Grunge Design. Helped me a lot on a client's site :)

» If you could write one thing on the Moon, what would it be?  ...  Last Reply: 5 months ago by Kamigoroshi.

That is the best so far I think ^^^^ :)

Here's a new one:

"Only you can see this."

» Who's your favorite comedian?  ...  Last Reply: 5 months ago by archangelchuck.

Russell Peters is awesome :)

my favourite at the moment is Frankie Boyle. You probably couldn't find a more mean comedian if you tried:


14

If you could write one thing on the Moon, what would it be?

Humor Community — Posted: Apr. 15, 2008  ...   Last By: Kamigoroshi @ 5 months ago

Got this from a sketch in Mock the Week.

Bit of a strange question, admittably, but please contribute. And this is gonna big enough for the whole Earth to see it on a good day :)

Mine would be 'I'm 7.3477×10^22 kg and I'm getting closer every minute. ^_^'. The fear!

» What blogger would you want to meet in person?  ...  Last Reply: 5 months ago by joshawesome.

Larissa Meek?

On a serious note, Ben from Binary Moon probably, sort of known of each other for a while, like to say hello and talk about Miniclip :)

ldragon's Activity Stream: Page 1 of 2 « FIRST  ‹ PREV  NEXT ›  LAST »

All Of ldragon's Chawlk Activity:

  • New Notes: 10
  • Comments: 51
  • New Clips: 0
  • Total Clip Votes: 5
  • Positive Clip Votes: 4
  • Negative Clip Votes: 1
 

Chawlk is part of the Chawlk Network of sites.

9 Great Places To Visit, Hang Out, & Meet New People

What's new and interesting at other Chawlk Network sites: