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

I'll try to check this out tomorrow but it might be a few days.

I'm moving into my new office tomorrow, and about to head to bed for a big moving day.

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

I would never rent a VPS without ssh.

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

Read our Search Engine Optimization forum :)

Ideas and suggestions and tips used to help others will help you learn as well.

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

We have a Python category at http://www.daniweb.com/software-development/python/114

Why don't you go ahead and post your question in our python forum?

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

When you say the cost of SEO, are you talking about hiring an SEO consultant or doing pay-per-click advertising such as with Google AdWords?

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

It was decided not to do that because many people have laptops with widescreen monitors, and vertical real estate is very important. The static header doesn't show at all if you have a very low resolution. However, for middle of the road folks, I chose to display the least amount that you would most likely want access to as you read a thread and scroll down the page (quick access to the homepage and the ability to search). The ability to edit your profile and such are things you do so infrequently that it's not necessary for the links to take up screen real estate and always be visible no matter what.

Most of the quick links you would want access to as you navigate the site are actually in the footer toolbar. Especially the Recommended button :)

Thank you for your feedback though!! Much appreciated. If anyone else has a thought on the matter, please feel free to bring it up.

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

You only need to use the refresh token for offline apps (when you need access to an active access token at a time when the user is not online and you can't send them through the flow).

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

You need to give me something to reproduce. However, without looking at anything, this is the flow:

  • Make request to /api/oauth
  • Depending on if end-user previously authorized at any time in the past, they will be asked to authorize and then you'll get a code, or you'll just directly get a code
  • Code can be exchanged only one-time for access token and refresh token with call to /api/access_token; Access token has 24 hour lifespan and refresh token has infine lifespan (unless end-user manually revokes it)
  • Subsequent calls to /api/access_token allow you to exchange your permanent refresh token for an access token whenever you need it; Each access token is good for 24 hours; Refresh tokens have infinite lifespans and can be exchanged at any time, as many times as you need
Dani 4,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

Not directly, no. Years ago we counted posts (#1, #2, #3, etc) but that didn't work because if a post in the middle of the thread was subsequently deleted, all of the posts after that were renumbered.

You can link directly to a specific post by clicking the timestamp within it to go to its permalink.

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

You have to click Edit on the post, and then go ahead and click on the paperclip in the toolbar the same way you did to add the attachments in the first place to give you the ability to edit/delete attachments. This should work for any post after our migration off of vBulletin. If it doesn't, it's a bug, and let me know.

Dani 4,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

I'm sorry, but I still don't understand exactly what you want. Do you mean you want syntax highlighted code snippets, the way that our code snippets have line numbers, etc? Or do you want people to be able to type in code snippets? Is the screenshot you provided what you're looking for, because I'm pretty sure that would be something like CodeMirror.

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

Check out the manual @ http://codemirror.net/doc/manual.html

It's just a few lines of javascript.

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

Here on DaniWeb, our editor is powered by http://www.codemirror.com

Is that what you're referring to?? I am slightly confused by your question.

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

It would be great if you could let us know if that worked ...

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

I don't know ANYTHING about .NET and I don't even know what listview is. But, if this is a web application that is outputting HTML, you only need to specify the dimensions for height or width and the other will be calculated to the correct aspect ratio. Probably of no use to you, but I figured I'd give it a shot.

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

JorgeM, while I agree with you, basically what he is saying is that he has a PHP file (which he listed above, although not pertinent) that pulls files from a file system and outputs them to the browser. When the PHP file tries to load a file from before the migration, it is unable to do so, but loading files after the migration works fine. That means that the Linux Apache user is unable to read the older files but can read the newer files just fine: Either an issue with the older and newer files being in different locations or have their permissions set differently.

If I had to guess, the root user migrated over all of the old files without chown'ing them to the Apache user, and the Apache user owns all of the new files.

That being said, this is sysadmin 101 and for your hosting company to say they migrated everything for you and are now stumped why it doesn't work means that they are incompetent.

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

I'm guessing that the reason you're seeing hyperlinks to broken images instead of the actual images is because their path isn't correct.

There's nothing wrong with your PHP file. The problem is most likely an Apache issue related to an .htaccess file or the way Apache (or whichever web server you're using) is configured.

Things to check:

  • Ensure the path to the httpdocs (or similar) directory is the same as it used to be on the old server
  • Ensure that all of the existing images are stored in the same relative directory as they used to be
  • Check the owner and permissions of all the old files (it's possible the owner changed during the migration)
  • Check that .htaccess files are the same

Things like that :)

Good luck!

Dani 4,645 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,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

What error message are you getting? Are you making it into the success section but just returnedItem is empty, or are you printing out that we've had an error to the JS console?

Dani 4,645 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,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

The error message says that something in the file variklis.php is trying to access the duomenubaze class, so we want to see what the contents of variklis.php are.

Dani 4,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

Glad that you got it working and that you find DaniWeb so useful :)
Good luck!

Dani 4,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

Sometimes ... often ... you know, I don't spend a lot of time in the programming forums :)

OK I'll add it to my list of things to do after the current weekend project I'm working on.

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

For the reason I mentioned above, which often has me clicking links in code snippets.

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

Broken for who? Your server? You get false positives on websites with IP blocks. Is that why they remain clickable?

We flag the link as bad if our server tried multiple times to try to access it, and it is 200% broken. If it "might" be, or if it seems like just a temporary glitch, we let it slide.

Cereal, good to know your feedback :) So it just started bothering you once we started crossing out the links, not having the links in the first place.

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

Completely out of curiosity, cereal, did this just start bothering you because broken links are crossed out, or have you had a pet peeve with links within code snippets all along (note, links have existed within code snippets here for the past decade)??

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

The link should not be clickable by default

The reason why we turn URLs into clickable links within code snippets is because sometimes snippets include comments with a link crediting the origin of the source code and that type of thing.

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

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

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

I work quick :)

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

Should be fixed. Please confirm for me, thanks!

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

Ok, I'll check that out. Thanks!

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

I agree, you would probably get some good use from Smarty.

But try this:

statusbar.php:

<style type="text/css">
.navbar {
    position: fixed;
    height: 20%;
    width: 100%;
    top: 0px;
    left:0px;
    background-color: #48a770;
}
</style>

index.php:

<html>
    <head>
        <title></title>
        <?php include('statusbar.php'); ?>
    </head>
    <body>
    </body>
</html>
Dani 4,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

Note: I just want to clarify that the reason for my post is because I had been getting that error a lot, and I clicked into this thread based on its title, and so I just wanted to provide an alternative solutions to others who might stumble upon this thread.

Dani 4,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

as for the basic "reputation points", well, you get points each time you reply, each time you log in, ... so basically, just be active on the forum.

That's "activity points" ... which you earn for simply interacting with the site. That's an entirely separate stat that has nothing to do with voting or reputation or kudos.

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

Ooooh I would kill for a Krispy Kreme. They closed down the one that was near me.

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

A moderator has the ability to mark a thread solved. Maybe someone else solved/unsolved it?? I'm not sure ... never experienced any type of bug related to this before. You would need to point me to a live thread where one page says it's solved and another page says it's not.

Dani 4,645 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.

The world predominently uses a single calendar because we live in an inter-connected world, and we are in need of that level of standardization, much the same way English has become the standard language for conducting International business.

In Israel, the Hebrew calendar is the country's official calendar, and most Israelis use the Hebrew calendar not just to track religious holidays/ceremonies, but also for personal reasons. They use the gregorian calendar because it's been forced upon them to participate in the world, much the same way English has been forced upon many non-English speaking countries.

As a Jew who lives in NYC, my kitchen has a Hebrew calendar hanging on the wall, not a Gregorian calendar.

Dani 4,645 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,645 The Queen of DaniWeb Administrator Featured Poster Premium Member

Done deal.

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

Ideally I'd prefer not to overwrite native browser behavior, but let me look into it :)

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

Yup, it does. Hehe.

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

Just post in our top-level Software Development category and tag your thread with 'OCaml'.

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

Can you give it a shot again now please?

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

You're arriving at the lost password page because Facebook, etc. is not able to authenticate you or allowing you to give proper OAuth authorization for some reason.

However, it's definitely an issue that you're getting a 500 error on our end. I'll look into it.