« first day (816 days earlier)      last day (4118 days later) » 

12:00 AM
@Lusitanian Thanks. I was looking for this link for so long. Now bookmarked
 
@shiplu.mokadd.im (:
 
Anonymous
@hakre I picked up Drupal yesterday. I would've hoped to have some handy documentation to read through carefully - there is none that makes all that much sense. Compare to codeigniter or laravel: learned that in a few hours.
 
Anonymous
Even WP was easier
 
Anonymous
I've spent the last 2 hours trying to add a navigation bar to my theme. WTF? Seriously. WTF.
 
4
Q: How to add a top nav bar?

MotoTribeI would like to add a Facebook style or StackExchange style top navbar to my site. It should show the username, mini profile pix, userpoints, search box and a few other links. Is there a module for that?

etc
 
12:03 AM
Are you kidding? Drupal is a complex system with a steep learning curve. You should consider at least two weeks until you are familiar enough with the theming system alone to create practical useful results. There is a lot you can do with Drupal.
 
Anonymous
Good start @Lusitanian but sadly doesn't help. I might be able to gleam enough from how they use blocks etc but it's nothing new to me.
 
If you take something pre-made it's much faster, sure, however that does not look like what you want, so consider investing some time.
But you're right about the documentation. There is too much. You normally need to buy at least three to four books for Drupal's current version to have things together in your own language and workflow.
 
Anonymous
@hakre if by "steep learning curve" you mean completely-and-utterly-stupid then yes... I agree. If you have a "menu" structure and you have nothing in place to facilitate actually displaying that menu structure apart from some heinously messy procedural code suggestions on the main drupal site then yes... I think it's fair for me to point the finger and say the system is arse.
 
Anonymous
ForkCMS is better even, and that was written on Spoon, which has a dev population of 0.
 
Protip: If you don't understand something, it does not mean it is completely and utterly stupid, and saying otherwise makes you sound quite conceited.
 
12:05 AM
@SkippyChalmers Most software uses their terms. So even you call somehing a menu must not mean that the menu the software is about is the same as in your mental model.
 
Anonymous
@Lusitanian I agree - except in this case I think it's fair. No menu? Fine, call it navigation? Oh the default drupal system calls it a menu? Great, now put it on the page? NAH! You can't do that, you need to use blocks. Make a block from a region - oh okay? Yeah - now put some UGLY ass code in a file called template.php. Oh? What's that? You want OO PHP? You don't want to use procedural underscored functions? No - you can't.
 
Anonymous
I'm not a n00b at this, I've written plenty of CMS's myself, including some pretty high end ones. This is not right at all.
 
So uh, why not use one of those?
 
Anonymous
Because I can't - I have to use drupal.
 
Anonymous
Ach - guys its just a rant
 
12:08 AM
Why must you use Drupal? heh
 
Anonymous
you have to admit though surely - Drupal is rubbish. Let's all say it together. Ever seen a brilliant site on Drupal? Nah - me neither. What attracts pansy ass designers but freaks out developers? Oh - Drupal does!
 
@SkippyChalmers Man buy a site that looks like you wish it. I think you will have a more easy time in your life ;)
 
Anonymous
It needs to be on an OS platform and client likes Drupal's "portability". Fine then. Let's do a custom theme. NO! NO THEMEING. The thing people do most often when using something like this - THEME it. Noooooo - that would be too unusual wouldn't it... nobody does that.
 
Except there are a ton of sites built on Drupal and all of them seem to have no issues with the navigation.
 
Anonymous
Okay fair point. Still - with comparison to even wordpress - theming on Drupal is a bitch, and really not written with usability or the Dev in mind.
 
12:12 AM
@SkippyChalmers drupal.org/project/zen
 
Anonymous
hey.. that actually looks... good
 
Drupal comes with one of the best base themes that are adoptable (rel.) easily while being maintained in the main project line.
 
Anonymous
Zen looks interesting
 
Anonymous
i can learn by example... hopefully - thanks
 
Anonymous
It still has an ugly ass template.php file but... it's a big step forward
 
Anonymous
12:15 AM
here's a code example lol
 
Anonymous
function zen_preprocess_page(&$vars, $hook) {
  // If the user is silly and enables Zen as the theme, add some styles.
  if ($GLOBALS['theme'] == 'zen') {
    include_once './' . _zen_path() . '/zen-internals/template.zen.inc';
    _zen_preprocess_page($vars, $hook);
  }
  // Add conditional stylesheets.
  elseif (!module_exists('conditional_styles')) {
    $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : '';
    $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, '');
 
Anonymous
.... clean :|
 
Anonymous
12:27 AM
no. screw it. Drupal is beyond redemption. Look at this:
 
Anonymous
/**
 * Return a themed set of links.
 *
 * @param $links
 *   A keyed array of links to be themed.
 * @param $attributes
 *   A keyed array of attributes
 * @param $heading
 *   An optional keyed array or a string for a heading to precede the links.
 *   When using an array the following keys can be used:
 *     - text: the heading text
 *     - level: the heading level (e.g. 'h2', 'h3')
 *     - class: (optional) a string of the CSS classes for the heading
 *   When using a string it will be used as the text of the heading and the
 
Anonymous
Screw it.
 
Anonymous
Everyone should be able to agree, this is far too much code to generate one simple navigation list.
 
Anonymous
That's not even all of it. Forget it. If wordpress can do it in about 5 lines then Drupal should be able to as well.
 
tiny avatar list time
 
12:31 AM
GAH! I HATE MOZILLA! XUL <label> elements can either be used to wrap a text node or you can put the text in a value attribute, which is the "recommended" usage - but if you use attribute it ignores appearance related styles like colours and fonts. Nowhere in the docs is this stated.
Not only that, apparently it didn't always do it.
 
Jan 5 at 23:12, by Lusitanian
@DaveRandom "Mozilla did something stupid" --- in other news --- you are not a hamster.
 
:-P
 
guys please take a look at this code am triyng to scroll results of a while loop from right to left one after the other but the results keep scrolling below one another   while($res=mysql_fetch_array($rr))
{
if($limit!=$res['MemberID'])
echo'<marquee><center><p class="fsize3" style="color:yellow;font-size:0.5em">'.$rank.':'.$res['MemberID'].'</p></center></marquee>';
$limit=$res['MemberID'];
$rank++;
}
 
In all seriousness, that's a rather ridiculous behavior.
You and @PeeHaa managed to convince me to switch to Chrome a while ago
 
@PeeHaa I'm going to need the private key for Chrome at some point soon, you should probably have a copy of the FF one as well for resiliency, it sucks that there's no safe way to store them sensibly online (unless you are aware of some way to do that which I am not)
 
12:37 AM
@DaveRandom Password protect them and store them in Wuala or something?
 
I guess we could just password protect them in the Git repo actually
feels a little wrong though...
 
user1125394
+encrypt them maybe
 
@cab password protecting them === encryption [yes, in this context]
 
(in this context)
 
hey, it'd be safe as long as the pws are secure
and frankly i don't think anyone's going to devote a massive cracking array just to attempting to release a chrome plugin in your name
 
12:39 AM
No, but it's not about "our name" it's about injecting malicious codez via spoofed auto updates
it does kind of matter
especially with FF, in which a plugin can manipulate the local file system
 
ouch
 
@rlemon ill set it up tomorrow
 
@DaveRandom 1 sec
 
kk, going for a cig anyway brb 3 mins
 
evening
 
12:53 AM
evenings @igorw
 
what's happening
 
Oh, stuff
Also things
 
Nothing much. Trying to find @DaveRandom mail address :)
AND wtf happened with github?
 
Gitpocalypes again? Running very slow for me
 
@DaveRandom new interface again :)
 
12:57 AM
new profiles are perty
 
@DaveRandom Your mailaddress was kinda burninated with the reinstall of my server :P gimme gimme gimme
 
also railscalypse and githubcalypse today
 
So I've heard
 
Dunno if you've ever had it :-P
 
@DaveRandom Yeah. I'm pretty sure I had at some point :)
wut?
 
12:58 AM
let me know when you got it, don't wanna leave it in transcript
 
not that one that I know :P
 
user1125394
say an HTTP or a HTTP ?
 
kill it
 
@PeeHaa I was able to find his adress in 30 secs
:P
 
@igorw Show off
 
12:58 AM
:P
 
@PeeHaa let me give you a tip: git log
 
@PeeHaa Yeh that's my current work address, I don't really check any other mailboxes because they all get battered with spam
 
that's how I usually fish for jabber addresses
 
@igorw Ah of course. Although even then I wanted to be sure before sending a private key :)
 
did not know that critical context, fair point ;,-)
 
1:00 AM
:D
 
@cab an age tee tee pee
unless you say "hage tee tee pee" like annoying people do
 
user1125394
"an HTTP response"? Id have said a
 
I say "an HTTP response"
 
user1125394
@igorw ok thx
 
grammatically the correct version would a I think because H is a consonant, not 100% certain though
 
1:04 AM
since you pronounce HTTP by the letter and the pronunciation of H starts with vowel, it's "an HTTP [x]"
 
github released another profile page update
sigh
 
It would be more complicated if you had an acronym that could be pronounced two ways, but that isn't the case for HTTP
 
user1125394
Im not sure fonts is monospaced in sublimetext
 
ta, I take it you emailed me the pass?
 
1:06 AM
correct sire
 
@DaveRandom The actual letter doesn't matter, it's the pronunciation that does. It's a iota, and an intake
 
@PeeHaa uploader.pieterhordijk.com hello give me an account (:
 
Who uses iota anyway ;) @Jasper
 
God damn it I hate IE. Why doesn't Outlook Web Access work in other browsers? M$ are so f*cking lazy, it doesn't even really need any activex in exch2010
 
@PeeHaa Just the first word I could come up with :P
 
1:09 AM
@Jasper "a iota"?
 
If I remember things correctly, words starting with an H (and that aren't pronounced by the letter) as some H's are silent and some aren't, which has almost completely disappeared from the English langauge, so you'll be doing some guessing :P
 
Generally these bit's of weirdness develop from avoiding a glottal stop
 
@Lusitanian Sure, in due time. Feel free to point your (sub)domain to it and ping me so I can add the domain to the vhost server. Or if you don't trust me with your files you can install it on your own machine. Once it goes beta I'll ping you and you can choose :)
 
@PeeHaa hehe let me know when it's beta time
you should add oauth login support
hint
 
Hey, useless trivia: "Orange" used to be "Norange" (same root as Spanish "Naranja") but over time it changed from "a Norange" to "an Orange"
 
1:11 AM
@Lusitanian That's kinda one of the two projects I want to integrate it with :|
 
@DaveRandom That's actually really interesting. I used to always call eggs "neggs" and ask people if they wanted "a negg" for breakfast.
@PeeHaa Do it :O
 
@DaveRandom To use more common words: a university and an undertaking
 
@Jasper Oh right I see what you mean
@PeeHaa lol @ that password. It is so secure it got eaten by my spam filter
 
:D
 
> Terms of service Please just don't be a dick when using this service. What is considered being a dick is up to the hosters of this website. Often being a dick can be prevented by applying some common sense and not breaking stuff.
:D
 
1:15 AM
It's clear isn't it? :)
 
@PeeHaa Issue though: This resource is password protected. Please enter the password. - nowhere to enter the password :S
 
very, DBAD license
 
@DaveRandom I noticed that too, figured you need to be logged in or something
 
@igorw Inspiration FTW :)
 
where is this? never seen it for a service
 
user1125394
1:16 AM
an Ypsilon is a yellow car
 
@DaveRandom wut? non way? I didn't do anything wrong. It all your fault? Didn't you read the TOS?
lemme check
Do you guys see a popup? Or just the message on the page?
 
Y U NO POPUP!?!?
JS error?
 
@PeeHaa Have you been writing for Canary and not testing in older browsers again?
 
@PeeHaa just the message on the page
 
1:19 AM
Uncaught TypeError: Object #<HTMLDivElement> has no method 'remove'
 
starting up Chrome stable
...
 
That error sounds like calling $.fn.remove() on a DOM element instead of a jQ object to me
 
There is no jQuery.
That must be the problem
:P
lemme enable the non minified version to see
 
@PeeHaa it works in chrome canary
 
You called .remove() on a DOM element, there is no such method AFAIK (obviously there is in Canary)
 
1:24 AM
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah +1
 
Do var el = this.get(); el.parentNode.removeChild(el);
 
@PeeHaa if you used jQuery that never would've happened (:
 
I know... :(
:P
 
No, instead 9000 unnecessary things would have happened to accomplish those two lines.
 
1:26 AM
wow. my vi converted himself in a christmas tree. oh joy
 
@PeeHaa over :P
 
And it started to auto complete things for me. What is happenning aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
lol
 
@Lusitanian Muhahaha :)
octet miime type FTW!
Can you test it?
 
1:30 AM
@PeeHaa site is not very responsive in terms of geometrical horizontal scalability
 
works now @PeeHaa
 
great tnx
 
We have a winner
 
@igorw Not on my "ITS URGENT QUICK NOW FAST!" list :)
Need to have something to do for v1.1 right? :)
Also need to come up with some elegant way of uploading files on tabs / phones and IE :)
 
I hope they are going to introduce a .remove() sugar method, it has long annoyed me that you have to do it in 2 steps.
 
1:34 AM
@DaveRandom I just don't get how that got through the tests. The bloody thing is full of popups
 
@PeeHaa Nice how IE doesn't rank among the desktop browsers, but among the mobile browsers :D
 
@PeeHaa fine with me :)
 
@Jasper In terms of drag and dropping files in the browser it's pretty much the same. Non existent :D
 
@PeeHaa Did you start with jQ and then remove or is vanilla from the ground up?
 
@DaveRandom vanilla-js.com
 
1:36 AM
lol, still amuses me even now
 
It's even more funny when directing people on SO to it. They often think it's the new best thing out there :)
 
@PeeHaa :D
 
@PeeHaa nice.
 
> That's right - no code at all. Vanilla JS is so popular that browsers have been automatically loading it for over a decade.
 
I love the download section
 
1:38 AM
related: does /dev/null support sharding?
 
likewise
@igorw yes, yes it does. it is also webscale
 
@Lusitanian I'm switching, right nao!
 
"DOM-Based XSS" cool story bro
I also like "all current browsers are affected by this vulnerability" as if browsers could protect against XSS given the current state of HTML and JS...
 
@igorw If any browser would have a chance to "mitigate" such an attack it would be IE by not or wrong implementing some feature ;)
 
1:55 AM
how to make db?
tell me now plz
is urgent
 
@igorw I've heard FoxPro is good
 
I'm off people. Laters!
 
word
 
@DaveRandom TIL.
 
2:23 AM
I've been thinking about how to do proper MVC in a framework, and what I've come up with is: http://www.example.com/<view>/<action> where the view is a combination of the template and the code fetching the content for it and the action is some function you want to call on the controller
It's all panning out quite nicely and it actually seems to flow more naturally than the system that's so often used by frameworks and said to be MVC
However, I do have one problem: views and actions have their own get variables and I need a way to separate those
 
. . .
 
Anyone have any ideas?
@webarto What's wrong?
 
Views having Actions doesn't seem more natural to me...
 
@webarto They don't. You basically just tell which action you want, and which view you want afterwards, the two are independent
 
user50049
controllers having actions seems natural to me, as the view you want can also be a segment
 
user50049
2:28 AM
/controller/object/action/view
 
user50049
like
 
user50049
/posts/1234/edit/wysiwyg
 
Yes, that is good.
 
user50049
Where the fourth segment is optional of course, some default is used if not specified
 
user50049
And of course action having a default as well (e.g. view), but could be trackback or print
 
user50049
2:31 AM
If your controller implements REST easily, e.g. your methods can have a verb suffix, such as posts_get(), posts_post() it becomes easy to organize
 
@TimPost your sample, is it about getting a page on which you can edit the post or sending the edited content to the server?
 
user50049
Or, this can be accomplished via routing too. But either way, requesting a view directly only makes sense in very narrow situations. I faced one, where I had to re-vamp a site that had a HUGE collection of static archived pages. In that case, I had to make provisions for views (the static pages) to bootstrap the framework and call the appropriate controllers.
 
user50049
... which executed and provided the correct data to the view.
 
Assuming it's about getting a page on which you can edit the post, all you're doing is getting a view, in which case the controller shouldn't have to do much and the "wysiwyg" at the end isn't a MVC View at all
And if it's about sending the changed data to the server, I don't understand what you are doing...
 
user50049
That could be, and probably because I'm not quite understanding what you're trying to do with view/action
 
2:42 AM
@TimPost It seems that our definitions of View differ in this case, as it makes a lot of sense to request a view directly in the way I am thinking about them (and if we are on one line on this, you should explain why it makes so little sense instead of just stating it)
 
user50049
This is where I started squinting a little:
 
user50049
18 mins ago, by Jasper
However, I do have one problem: views and actions have their own get variables and I need a way to separate those
 
Let's start of by saying that I am very much working with the concepts of things here. As such, when I say <action> that can be an action on the one single controller or /<controller>/<action> with the <action> on <controller>, it's still about the action and it doesn't matter how we refer to it
 
user50049
Which is why I said just using segments makes sense, as it seems so much cleaner to let the controller decide on the view based on the controller requested, an object referenced and the desired action (if other than the default action for the type of object requested)
 
user50049
@Jasper It's probably me being dense, but I can't quite wrap my head around what you're playing with. The disconnect is definitely on my side :P Sorry.
 
2:51 AM
Let me try to explain myself with an example based on a forum. The idea would be to have /topic-4/editpost edit any post based on the POST variables, then show topic with id=4. The idea is that the whole part that outputs the HTML (the post template with GET variable id=4) is the View, while the editpost (or post/edit if you prefer) is the part where you ask the controller to edit a post
The forum wouldn't provide the link itself, but you could do /profile-15/editpost instead and get shown the profile of a user after posting a message, which may make no sense logically
The idea is that in traditional MVC, the message to the controller tells it to modify the model and possibly the view, but we get to keep the current view (which updates to the new state of the model). Instead of keeping the view, here, we tell which view we want on the next pageload in the message as HTTP isn't built to let you keep your view.
@TimPost Am I making my intent clearer or just even fuzzier?
 
3:06 AM
Hi guys, just a general computer science question (I believe) even though this is C++. I'm quite new to C, and haven't really done much work with hex before. When doing "\0x190\x00\x00\x00" I was trying to set a number to 400, instead it set it to this massive number. I don't really understand hex that well, so I was just using Google's number to hex converter. I was assuming the 0x190 went to the first hex value.
 
user50049
Is there a reason an abstract class can't declare an abstract constant that the child must define?
 
@Alec This is PHP not C++ and that's not a general computer science question and I don't think you;re giving quite enough details on what you are trying to do.
 
@Jasper Write over a memory address with the specified byte value. Didn't know that was anything programming language specific, when going down to the core fundamentals.
 
@TimPost constants can't be abstract... While that may be an interesting concept, it's not really meaningful yet in any language I know of...
@Alec look up big endian vs little endian
 
@ircmaxell Thanks.
 
3:15 AM
endianness!
 
user50049
@ircmaxell I can accomplish the same thing with a static method, it just struck me as odd that a constant couldn't be part of the contract that a child must implement.
 
@Alec: It may not be entirely language specific, but few languages allow you to write directly to the memory of a variable and PHP is not one of them. I do see now that @ircmaxell point jmay well be the answer to your problem
@TimPost @ircmaxell You can define a constant that a child may overwrite, right? That way you get sort of the same as what you wanted except with a default value for those that do not define it.
 
You cannot overwrite constants. At all
 
user50049
not without runkit trickery that often results in fantastic explosions :)
 
does anyone here know sqlite
i forgot this one
SELECT SUM(amount) FROM vat_tb WHERE taxID ON( SELECT ID from tax_tb))
 
user50049
3:25 AM
summons magical forces from the ether so I can look at his monitor and see the context of the problem .. @Androyds can you be a little more specific?
 
@TimPost im getting sum of amount on the table vat_tb
the vat_tb consist of taxID
I need to get the sum of the amount column based on the ID of the tax_tb
 
@Androyds shouldn't that be IN instead of ON?
 
thats why "taxID ON( SELECT ID from tax_tb))" but ive got the wrong sql
w8
 
@ircmaxell what's this then: ideone.com/vg3uhR
 
@Jasper you are right hahah I forgot all of this thnks ^_^
 
3:32 AM
@ircmaxell Of course, it doesn't work when using it as a "factory constant" so I suppose you could have meant that
 
@Jasper You understand that you did not overwrite a constant there, right? You created an entirely new constant for an entirely different class.
 
@GoogleGuy Well perhaps technically it's not overwritten, but we create a constant using a name that would otherwise have been resolved to a constant from its superclass, so unless you are using it as a "factory constant" (like a factory method, but a constant) it behaves as if it was overwritten
 
@Jasper Not at all. It is a completely different constant. One is A::a and the other is B::a. You did not "technically" overwrite anything.
@Jasper Inheritance rules don't change the constant name. The constant that is inherited from A is still called A::a, just because the runtime resolves C::a to A::a for you doesn't mean you have renamed the constant.
 
@GoogleGuy You did not "technically" overwrite anything. == Well perhaps technically it's not overwritten
@GoogleGuy And yeah, you're repeating what I'm saying there too...
 
> it behaves as if it was overwritten
I was addressing this
It does not behave as if it were overwritten. It behaves according to the rules of inheritance. i.e. you inherited A::a into C making C::a resolve to a forwarding call of A::a. It's just late static binding. No behavior reflects overwritten constants in this scenario.
Quoting you does not entail repeating you. I am actually correcting you.
 
3:58 AM
@GoogleGuy My bad, I suppose I was just using factory method wrong. I meant to say "unless you use the constant in the super class". Thinking about it again, the remainig use cases don't go much further than "Enforcing that the public interface of a class has a constant which you can only use if you know which implementation of the interface is used.", which makes it rather useless
@GoogleGuy You were trying to correct me, but since you didn't change anything I said, there it was repeating. Or, in other words, there was a flaw in what I was saying, but you didn't quite manage to point it out
But anyway, that means you are right
 
@Jasper I have no idea what you're talking about right now. I was just addressing the fact that you were replying to @ircmaxell when he said that you can't overwrite constants with code that implies you were overwriting constants, which was completely false. That is all.
 
@GoogleGuy My "unless" part was wrong and misguided. You didn't deny that part but instead added things I never disagreed with and concluded from that that I was wrong, which meant that you weren't correcting me and were repeating me. I found out what was wrong with my statement without having your "corrections" to go by
 
Cool stuff. You're all set then :)
 
4:29 AM
can anyone help me in php ?
 
@freelancer please read the topic of the room
 
ohh
i am uing php file say example.php in html of button can i use onClientClick to call javascript function or its property for .NET only
 
onClientClick is a .NET thing
 
than you
 
HTML does just have onclick though. You can do <input type='submit' onclick='func()' />
However, it's generally considered better practice not to do that
and instead attach your events from your javascript
 
4:37 AM
k
 
as such: <input type='submit' id='mybutton' /> with: document.getElementById('mybutton').onclick = function () {..}
Or better yet use addEventListener
 
k
thanks josper for help
 
you're welcome
 
 
2 hours later…
user50049
6:14 AM
What is the technical name for being able to access a specific member of an array returned by an object? e.g. $query->fetch_array()[0] and what version of PHP did it appear in?
 
user50049
I can never remember what that's called.
 
@TimPost In the manual it just says:
> As of PHP 5.4 it is possible to array dereference the result of a function or method call directly. Before it was only possible using a temporary variable.
 
user50049
That's what I was looking for, I didn't come up with the right combination of words to turn that up it seems. I thought there was an actual name for doing that but .. I suppose not.
 
user50049
6:29 AM
It's just .. dereferencing I guess. Damn I'm sure I saw a better name for it
 
Hi hows it goin!
 
@naeluh quite good, how about you?
 
@jasp
@Jasper doin good also nice nite to do some php haha
 
@naeluh Not exactly night here, but I haven't been having much of a day/night rhythm lately anyway
 
@Jasper yeah I know what you mean I am pst so its nite here my bad forgot the world was round for a sec haha
 
6:37 AM
hello and happy new year
 
@naeluh No problem really, I believe it's sort of the normal thing to just forget that because simple thing like greetings get too complicated otherwise (I'm just that one person who keeps bringing up that it is)
@Happyninja Hi! Happy new year
 
@Happyninja happy new yeah!
 
I had the number 1 most beautiful gift yet. I just released my first project and it didn't crash yet
 
hehe
 
way to go!
 
6:41 AM
@Happyninja What sort of project is it?
 
some kind of content management based on xml
4 months ago my boss asked me to do it for a client. I learnt to program it while doing it.
 
Nice job!
 
the past 4 months was like an freaking obsession, I had bad dreams and dreaming about it
do anyone know what is the most simple way to control who can see say a pdf file. Context: they will be about 200 different users.
 
apache?
 
yes
 
6:48 AM
do you already have a user system it should be hooked into?
 
nope
at the moment I'm trying to figure it out too
 
well, I'd say
 
there will be say 8,000 documents with 3 levels access
 
1. Create a user system, this can be something simple with users and hashed password in your database but can also be something fancy like php logging into the unix users it doesn't really matter what you do
2. In some place keep a record of what access level a person has (like in the user database row)
3. Keep a record for each document which access level it requires
 
my guess is the hosting will be shared so everything must fit in the same root
 
6:52 AM
Nah, wait, I'm possibly making things more messy than they need to be (as I don't know enough about your situation)
Can you move the pdf documents to a folder per access level?
 
@Jasper a thing I'm not sure at all is; it is possible to achieve a real file control over who can call the file otherwise than using obscurity?
 
@Happyninja yes it is
 
I search on php.net but i'm really not sure what to look for
 
Plan 1: Forbid direct access to the files and serve them through a php file that checks if they are allowed to get the file (this strategy does not have the pdf extension in the url bar..)
Plan 2: Redirect the requests for the pdf files to a php file that serves the file if they have permissions. (It's similar, a little more work but has the pdf extension in the url bar)
 
would it be enough to put that in my htaccess file: Order deny,allow
Deny from all
 
7:02 AM
@Happyninja That way you wouldn't yet be able to get to them
 
but if i block it, how can i call it myself to say, display the pdf?
 
@Happyninja but yeah, if the .htaccess is in a folder with nothing but the pdfs and you are going to serve the pdfs through a php file that's outside that folder it would work
Take a look over here to see how to serve a pdf file through a php file:
 
thanks, it works
would you recommend to put a hash in the url to ensure the request is legitimate?
 
I'm not sure I understand what you mean with that
Could you explain what you are suggesting to do?
 
say i serve the file trough php and i want to control the access, could it satisfy authentication to leave a hash in the url with a prefix so if someone try to share the link i could redirect it to the login page instead?
that way legitimate user could put their own file in their bookmark? or is it irrelevant?
like a token?
 
7:13 AM
Personally, I would prefer either giving a 403 like you do with Deny From All, or to use mod_rewrite to refer to the file of your choice (which can be the login page only if a person doesn't have access and the actual PHP file if the user does have access)
 
hi, do any one know about how to build a table Avery A4 - Product Number L7160-Address
html,css
 
what do you mean with Avery A4 - Product Number L7160-Address?
 
if you search this on net, 21 labels per page
 
do you mean the printer?
 
Avery A4 - Product Number L7160-Address? this mean 21 labels per page
no, I want html, css . to create these. each row have 3 columns, and 7 rows.
with fix height, and width.
 
7:18 AM
If you know a little html and css that should be really trivial to make
and since we're not your code generating machine, I doubt anyone will be willing to write it for you
 
yes, I think there may be already some templates. I have make it twice, but its showing wrong result. on different machine
 
That's a completely different story
You should show us what you did
And tell what it gets you
Try to find out what makes it different on different computers
And then we'll be happy to help you
 
ok thanks
 
@Jasper thanks you, I started
 
No problem at all. If you get stuck feel free to ask questions.
 
7:29 AM
yes ;)
 

« first day (816 days earlier)      last day (4118 days later) »