Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Matt Cutts recently announced that guest blogging is now a no-no with Google. It just got too spammy for Google's liking.

http://searchenginewatch.com/article/2324561/Matt-Cutts-Says-Stop-Guest-Blogging-for-SEO-Heres-Everything-You-Need-to-Know

And I've been long advocating that forum posting and blog commenting do little more than make you out to be a spammer, as well. Just my two cents.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Bug fixed.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

In this case, you got two upvotes and Mike Askew rep commented that he agrees with you. So there's your posse for ya.

That being said, I came up with a compromise that I'm happy with.

http://www.daniweb.com/api/members/1

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Glad that worked out for you!! :) Unfortunately I didn't get a chance to post in this thread earlier (although I was meaning to), but my take on it was that you and your boss didn't have a meeting of the minds when it came to what your job duties entailed. He probably thought that you're a smart computer guy and could take over some of the IT responsibilities, I'm guessing?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Oh wow, it was my link checker script. I was 110% convinced the problem was that we were flagging the link because we couldn't retrieve the http headers for some reason (potentially an issue on our end), but it turned out to be an issue with links that involve hashtags. Wow.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

A few new OAuth-related API features.

Firstly, there is now the concept of scope. So if you want to do things like spy on a member's private messages or chat on their behalf, you now need to pass in the required scope (details in API documentation) to ask for more than just basic privileges.

Also, members can go to their profile to see exactly what outstanding access tokens exist for their accounts, in the same place as they can deauthorize.

Also, long requested feature ... You can now change your secret token and delete existing applications.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Update!! There's now an Import from LinkedIn button on the Edit CV page. It imports everything from there, and plus, if you edit your LinkedIn, and then hit it again, it makes only the appropriate adjustments on our side.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Your CV tab within your member profile is just that: targeted towards members who are browsing your member provile to see your CV.

The career profile page is designed to be minimal, as Mike points out, in that it doesn't have the standard DaniWeb header/footer and all of the other stuff targeted towards browsing around and participating on DaniWeb. Instead, it's targeted to be a single landing page that you could put on your resume when applying for jobs, or link to from your own blog/website, or other social networks, etc., where a non-DaniWeb member can get a quick one-page overview of who you are.

It's designed to showcase your achivements at-a-glance both within the DaniWeb community as well as within your professional life (which prospective employers like because it's a more unbiased, well-rounded view of you), in a way that doesn't require any prior understanding of how our kudos systems work.

Also, throughout the entire site, yellow buttons are used for calls-to-action: The main thing we want you to do when you're on the page. Blue buttons are used for secondary navigation, the ability to make changes to things, other places to venture off to on a tangent, etc.

The link to your member profile from within your career profile page is blue because we want to provide the ability to dig deeper into the DaniWeb community member behind the professional profile, but at the same time it's not the primary purpose of the page.

diafol commented: thanks +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Davey, that's a link to the new CV feature within your member profile, but we take that a step further to create a whole new career profile for you (outside of your standard community member profile).

Yours is here: http://www.daniweb.com/profiles/67225/happygeek

You can see that, unlike your normal member profile, it's not aimed at other community members, but rather targeted towards outsiders to showcase your achievements at-a-glance both within the DaniWeb community as well as within your professional life. This is the page that your byline now links to for your editorial content, and we hope it's a page you would be proud to show off to future employers that would make more sense to them overall than your DaniWeb member profile. It is designed to give employers what they want -- which is a more unbiased understanding of who you are as a whole, with data (such as your rank out of one million members) and links to some of your more recent content to back it up, instead of just what you want them to read -- without all of the fluff targeted towards other DaniWeb community members. You'll notice it doesn't even have the standard DaniWeb header/footer.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The system is designed specifically to prevent people from doing what you want to do :)

We don't want members to be able to go back and replace their post with "Nevermind, I got my answer" because other people might have the same question, people read the thread, people might have replied to it.

So much of the content you post goes to be seen and help so many other people. We don't want content being manipulated after it's already been posted unless it is a rule violation because that is just confusing to other members, and disrespectful to members who might have replied to your post, whose posts now make no sense since you edited.

We allow posts to be modified for up to 30 minutes because that is an acceptable amount of time to correct spelling mistakes, things you forgot, etc.

However, after that, it's complete moderator discretion whether a post should be edited at all. Most often, we'll only edit it if it breaks a rule.

RikTelner commented: Thanks for answering. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

My weekend project = CVs in member profiles!! Check it out and submit yours!!!! :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome to DaniWeb :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you limit that to just the last 3 or 4 posts in the thread?

It's already limited to one page of posts (which, off the top of my head is 15 or 20, I think??). If there are more posts than that, it just puts a little ellipsis thingy and then includes the first post of the thread as well.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

But like I said, I think this definitely is 10000% better than trying to navigate the forums from a smartphone. At leat it gives you an easy way to read content and, you might not be able to evaluate long code snippets, but you can still consume the majority of content and follow along.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

If you're moving to a new host, I wouldn't be so quick to jump into a 5 year contract.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Also, does it print out JAH! because, if it does, you know it's a db related issue.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Are emp_name and emp_address the name of the fields in the database?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

So basically you need two php files. One to handle the main overview page, and a second one to handle the actual full article page.

Then what you're going to want to do is integrate with some type of database. MySQL tends to be the most common when working with PHP, simply because it's free (as is PHP) and they work well together. You would then create a table in the database of articles which includes all of the article information.

On the main overview page, your php file will fetch the articles from the database and print out their snippet descriptions.

On the actual article page, your php file will fetch the desired article from the database and print out the full article.

What you're asking for isn't very complex. One database. One table. One php file to view all. One php file to view an individual article. And then, behind the scenes, you're going to want yet a third php file for you to actually submit new articles into the database.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It's for headers. Use it for article titles at the top of a page. 'Nuf said.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Did you try phorce's suggestion to print out the error message, if there is one?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

OK, working links in code snippets are now only underlined when you hover over them and broken links in code snippets are crossed out when you hover over them. The rest of the time, they don't interfere with your code reading.

cereal commented: thank you! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hmm, looks right at a quick glance. Nothing staring me in the face. Are you definitely sure that it's the right table and the table is populated?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Rev Jim asked me to write a sentence which contains the consecutive words 'and and and and and'. And there you go.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Did you make the suggested change and write

class duomenubaze
{
    ...

On the first line?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Off the top of my head, change

if ($redirect == true) {
    header("Location:$redirect_page");
}

to

if ($redirect == true AND !empty($_POST)) {
    header("Location:$redirect_page");
}

The $_POST[] array gets populated with the form fields when someone submits a form. So we can say to only do a redirect if that array isn't empty, aka someone submitted a form. Of course we can then do more complicated things like redirect to one place if the form says ABC and redirect somewhere else if the form says XYZ.

mattyd commented: Thank you for your help. +7
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

That's by design. We put a strikethrough through broken links.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Unfortunately, your new account has been banned as well. We have a strict policy where we do not allow users to create multiple accounts for the specific purpose of trying to evade a ban. Members in good standing can have multiple accounts, but banned members cannot.

It looks like your ban is set to expire in March. Hopefully the next three months will be a cool-down period for you where you can realize what you did that got you kicked off of the site (purposely trolling just to be rude and annoy everyone else who takes this site seriously.)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I moved this question to the Web Dev forum where you are most likely to get responses ... you posted in the Geeks' Lounge which is just for off-topic hanging out and not any serious questions.

I can tell you from my own experience that if you aren't capable of handling all of your visitors, your servers COULD crash and not just slow down.

Firstly, I assume your site uses a database since you mentioned phpBB ... is the database server on the same physical box as your web server??

It's been my own experience that Apache could crash if it is trying to use more memory than the physical server has available. So, for example, if each instance of executing the script takes up 8 megs of ram (just making stuff up), then if it's hosted on a server with 2 gigs of ram, there's clearly an upper limit on how many scripts are capable of executing simultaneously before something won't be happy because it's trying to allocate more ram than physically available.

The good news is that it usually takes only a second for a script to execute, and once it finishes executing, it frees up the memory for another instance of the script to execute. Therefore, it's pretty unlikely that soooooooooooo many people would be trying to load a page at the exact same second as to use up all of your ram. What would simply happen is that, based on how many cpu cores you allocate …

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Completely unrelated, but I recently kept getting that error when a file had not completed uploading.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The assignment itself is pretty good pseudocode already ...

if (temperature > 35)
{
    // do something
}
else if (temperature > 27)
{
    // do something else
}
else
{
    // do something else
}

Remember, we start at the first condition, and if it's true, we go into its code block. If it's not true, we move onto the next. So if the temperature is over 35, we go into the first block. However, if it's not, we check the second block. So when it checks the condition for the second block, we already know the temperature is 35 or under. Therefore, we can just check to see if it's over 27, and that will satisfy the 'between' requirement. If the temperature isn't over 27, we know it's 27 or under, and then we, by default, go into the third code block.

You need to retrieve eight temperatures from the user and loop through them, testing each one. You also need to figure out what to do within each code block.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Xmas is the version that takes the Christ out of Christmas and turns it into a non-demonational, non-religous simply festive national holiday.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Why don't you share your ideas about it first, and then we'll chime in?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Oh, and also ... in the old system, each time you infracted or warned a member, you started a thread about it. So Davey, 20K+ infractions and warnings handed out + bad posts flagged sounds about right.

I rechecked and rechecked the database a bunch of times. The current numbers are correct in terms of real posts that live on the site today.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You may notice a change in your member statistics (post count, reputation, solved thread stat, etc).

After server issues left the database out-of-sync, I've gone ahead and recalculated all of the counters based on the latest data. There has NOT been a change to the way anything gets calculated ... things were simply re-tallied.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Rch1231's suggestion worked like a charm!! :)

After being plagued by server issues, our counters got a little out of sync, and I needed to recalculate all of the statistics for all of the members.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It's negative press if we get labeled as spammers though ;)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

When browsing a forum listing, you can now click on the link that tells how many replies there have been to load a lightbox showing how many contributors there have been and who they are, along with their reputation. You can now quickly see the quality of the people who have participated in the thread before loading it.

Learner010 commented: why don't we have the same for forum views. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Do you propose that followers of different faiths or of no faith residing in the same country use different calendars? Bit of a strange thing to suggest AD, even for you.

I'm in NYC and us jews use the hebrew calendar, so yes. :)

http://en.wikipedia.org/wiki/Hebrew_calendar

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Please don't dis Fred, or I'll have to tell him you said so.

<M/> commented: tell him then :D +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
The nature of this tutorial ...

This tutorial is designed to walk you through DaniWeb's implicit (clientside) OAuth flow. This is not designed to be an introductory tutorial to OAuth, and we will expect that you are already familiar with the nature of OAuth and/or have read our tutorial on Getting started with OAuth 2.0 Explicit Flow.

The implicit flow allows you to acquire an access token and access the API entirely from within a browser-based javascript application. While this tutorial is specific to DaniWeb's API, we do adhere to OAuth standards, and so the flow should not be very different when working with other services.

Acquiring an access token with the implicit (clientside) flow

As with the explicit flow, the first step to using OAuth is to register your application with the service in order to generate a client_id and client_secret unique to your application. Because the entire application is browser-based and client-facing, we do not use the client_secret because the end-user would have access to it by viewing the javascript source code from their web browser. Instead, the application authenticates itself by ensuring that it resides on the same domain name as you used when you registered your application.

Our implementation uses jQuery for convenience. You will need to include the jQuery library if you plan on using our example within your own application.

Step 1

The first step is to load the service's authorization dialog in a popup window, along with a way to get …

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
What is OAuth and why do I want to use it?

If you want to write an application that caters to existing members of a service, and you want your application to be able to access private areas of your end-users' profiles, or modify their accounts on their behalf, then you need OAuth. OAuth allows your application to automatically detect which member is using it without the member having to share anything about themselves. Additionally, it allows your application to authenticate itself to a service API with the member credentials of an end-user who is using it, without the need for the end-user to share their login credentials.

Essentially, you would send your application's end-user to a webpage hosted by the service where they are asked if they authorize your application to access their account. Once they say yes, then your application is given an access token which is unique to your application and the individual end-user. Whenever you need to access the API on behalf of the end-user, you send the access token along with the request.

Daniweb supports three different types of OAuth flows. There is an explicit flow (for serverside programming languages such as PHP or C#). There is an implicit flow (for clientside languages such as javascript with AJAX). And there is an out-of-band flow for desktop applications that don't have the ability to accept incoming HTTP requests. For the purpose of this tutorial, I am going to walk you through connecting to DaniWeb's …

cereal commented: nice! +11
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Another suggestion: The link in "Edited post in ..." or "Replied to post in ..." -- suggest the link go to the post in which the member posted or replied instead of just to the first post in the thread.

In the activity stream, each time a particular post is referred to, you can click the little blue arrow icon to jump directly to the post.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

PHP isn't designed to degrade nicely for fatal errors (i.e. parse errors). I did some research and got the following to work. Hopefully it can help others:

register_shutdown_function('_foo');

function _foo()
{
    if ($error = error_get_last())
    {
        $foo = date('Y-m-d H:i:s') . ' --> ' . $error['file'] . ' --> ' . $error['message'] . ' ' . $error['line'];
        file_put_contents('./logs/fatal_errors.php', "$foo\n", FILE_APPEND);
    }
}
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Done deal.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Thank you and I'm so glad that you enjoy the site! :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Looks like it works to me?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Apart from that, I'd love a way to hide the avatars.

We've been moving away from this over the past few months as we emphasize membership and community.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Fixed and sorry about that Prit :)

AD, it's been like that for half a year. :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Oh, and also, I know it's not that intuitive I guess, but when the activity stream tells you that someone replied to a thread, you can hover over the thread title to see a preview of the first post in the thread, and you can hover over the little 'reply' arrow icon to see a preview of the post that was just made.

<M/> commented: :D +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Nearly 5 am and I lost track of time and spent alllll night coding up our new homepage, which features our Activity Stream.

Secondly, there's now a 'New' tab within each of the forums to sort articles based on created date as opposed to last post date (which of course is the default).

<M/> commented: :D +0