• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Webmasters Discussion / Lounge

Status
Not open for further replies.

aRedMoon

Wait for me outside the lines
11,127
Posts
20
Years
If I remember correctly (it's been a while since I've used vBulletin), posts and threads have not only the user ID stored, but the username as well (which is one of the main reason username changes on huge forums can be a very CPU-intensive process). It's likely just referencing the stored username when showing the last post which, unfortunately, ignores your modifications to the code that retrieves a username.
This is correct, at least for the vB 3.x series. Not sure if they changed it for 4.x because it was something that people were requesting.

And yeah, that's why changing the username borks servers. :X Because it has to go through and change every instance, instead of just the one.
 

droomph

weeb
4,285
Posts
12
Years
allllright. I'm kinda stuck on this one.

I was just screwing around with the css until I noticed that the main.css wouldn't change the actual .php pages unless I directly put them in there.

what am I doing wrongggggggggggggggg
 

Archenoth

The arch foe
467
Posts
12
Years
  • Seen Nov 6, 2020
allllright. I'm kinda stuck on this one.

I was just screwing around with the css until I noticed that the main.css wouldn't change the actual .php pages unless I directly put them in there.

what am I doing wrongggggggggggggggg

Directly? You mean like putting element styles with a style tag?
It may be an issue with something overriding your CSS later. Try adding an "!important" directive to your CSS.

Now for some dumb "covering all bases" questions:
Is main.css included in your page? And is another CSS file included afterwards that overrides it?
 

droomph

weeb
4,285
Posts
12
Years
right. sorry to bother you guys again <3

Disregarding client-side and server-side and technical stuff like that, is it possible to use php variables in javascript and vice versa once you create the variable on either?
 

Archenoth

The arch foe
467
Posts
12
Years
  • Seen Nov 6, 2020
The two most common ways to get PHP data into JavaScript is to either:

a) Use AJAX with a PHP file that spits out JSON with json_encode(). For example:
Code:
<?php
// Some code that sets $var to the desired value or array.
echo json_encode($var);
?>
Then use JSON.parse to parse your JSON into a usable JavaScript variable.

OR...
b) Echo JavaScript-usable data into the page... For example:

Code:
<script type='text/javascript'>
  var somevar = <?php echo $var; ?>;
</script>
Be very careful with this approach though since it is very vulnerable to XSS. (Imagine if $var is set to "4; alert('Hi!');" for example...)

For JavaScript to PHP, since PHP is server-side, this requires server activity. You'll either need to use AJAX or reload your current page with the GET or POST variables you want. GET variables are easy since you can fire an AJAX request to someurl?var=<someval>&anothervar=<someothervar>.
 
Last edited:

droomph

weeb
4,285
Posts
12
Years
The two most common ways to get PHP data into JavaScript is to either:

a) Use AJAX with a PHP file that spits out JSON with json_encode(). For example:
Code:
<?php
// Some code that sets $var to the desired value or array.
echo json_encode($var);
?>
Then use JSON.parse to parse your JSON into a usable JavaScript variable.

OR...
b) Echo JavaScript-usable data into the page... For example:

Code:
<script type='text/javascript'>
  var somevar = <?php echo $var; ?>;
</script>
Be very careful with this approach though since it is very vulnerable to XSS. (Imagine if $var is set to "4; alert('Hi!');" for example...)

For JavaScript to PHP, since PHP is server-side, this requires server activity. You'll either need to use AJAX or reload your current page with the GET or POST variables you want. GET variables are easy since you can fire an AJAX request to someurl?var=<someval>&anothervar=<someothervar>.
hehe thanks :p that makes it a lot clearer

Soooooooo I'm trying to implement a whissiwig editor or whatever it's called onto my website, and I have with the tinyMCE program…

however one problem is that it takes a long time to load, much worse than the one on PC, but I suppose because it's not WYSIWYG, so…

1) how to make it load faster, or 2) what other better options do I have?

sorry for asking and not telling, but I'm a noob at this :p
 

Archenoth

The arch foe
467
Posts
12
Years
  • Seen Nov 6, 2020
hehe thanks :p that makes it a lot clearer

Soooooooo I'm trying to implement a whissiwig editor or whatever it's called onto my website, and I have with the tinyMCE program…

however one problem is that it takes a long time to load, much worse than the one on PC, but I suppose because it's not WYSIWYG, so…

1) how to make it load faster, or 2) what other better options do I have?

sorry for asking and not telling, but I'm a noob at this :p

Are you familiar with your browser's web-inspector network tab? Because it is a great asset when checking to see why pages load slowly.

This is the network inspector tab in Opera Dragonfly...
Spoiler:


As you can see, it shows how long each request and response took, and if you mose over the bars, you can see a breakdown of what process took what amount of time:
Spoiler:


If something takes a long time, you can try to utilize caching, which will, instead of sending all of the data to a computer that has downloaded it again, send a simple 304 to the browser to indicate that it hasn't been modified:
Spoiler:


As you can see, this cuts down the amount of time a browser needs to download anything A LOT.
Spoiler:


If you have access to the configuration of your server, you can set it to use aggressive caching by sending an "Expiry" header with it's responses to allow data to be cached to make your site seem blazing fast, even if it uses exuberant AJAX and styles.

You can find out how to utilize the Expires header here.

Yahoo has some good guidelines too: http://developer.yahoo.com/performance/rules.html#expires
 

MKGirlism

3DS and Wii U Game Developer
414
Posts
11
Years
I've made my own CMS, which I called "CWMSv4".
At the moment, it's not really intractable, but I'm planning on putting in more features people other than me and our Staff can use.
To rate it: http://www.cw-games.org

In addition, I'm using AcmlmBoardXD on my Blog/Forums.
While I love the Forum Software, I'm still not really used with Styling it.
Here's what I've made of:
http://www.mkgirlism.eu/?page=board
(It includes a Mobile Theme.)

Could you guys/gals give a Feedback for both?
 
22,952
Posts
19
Years
cw-games.org thoughts and comments:
At this point, the website looks quite plain and very basic. You probably don't have a full-time staff to dedicate to it, but you need more visuals to make the site appear more enticing to the general public. The site does appear to meet the "get to where you want to go within 3 clicks" guideline for design quite well, though. That site's support forum is very basic and gives off quite the '90s forum vibe, and it is very hard to tell what's the actual post content and what's just information regarding the post or poster. The support forum has too much going on with each segment of a post being given its own visible border.


mkmgirlism.eu thoughts and comments:
Your forum's default style, while interesting, could use a few tweaks, including the pink drop-shadow behind all the text that has it. That drop-shadow makes it very difficult to read certain usernames. Actually, you may want to change the font-color of that group of usernames, as upon closer inspection it seems that it's the background color of the content areas of the forum that those usernames really clash with.
 

MKGirlism

3DS and Wii U Game Developer
414
Posts
11
Years
As for the first site, the plain and basic look is on purpose, because it's meant to be as lightweight as possible.
After all, I don't want to create a MySpace-clone out of it.
The Support Forum is something I agree on, that's why I'm planning to focus my Updates fully on the Forum part.

For the second site, it's actually "MKGirlism", not "MKMGirlism" (it stands for Mario Kart Girl, by the way).
Though it's true the background colours, I didn't want to make it to pink or to blue, just something that's calm to the eyes.
Group names are indeed a concern, so I guess I'll check out what I can do with the colours, as it conflicts with the names if somebody is female (female users are pink, male users are blue, and people who didn't specify their gender are purple, in case you want to know that).
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
Finding out about Microsoft WebMatrix was a pleasant surprise. Turns out it's extremely easy to create, test, and publish entire sites when you have a proper web site editing/testing suite on your computer.

I particularly like IntelliSense and how extensible WebMatrix itself is. It didn't take too long for me to stop using Notepad++ and manual FTP uploads and move to something way more integrated - and less haphazard.

Bonus points for finally getting some PHP action in.

Now, I have to figure out what the heck is up with PHP includes on the other side... (I can't change the include paths.) I've went with somewhat harder paths for now. (things like /home/twigzone/public_html since I'm on shared virtual)

(By the way: what do you guys here think of ASP.NET? And on a related topic, how does one do something similar to ASP.NET layouts (automatically inserted boilerplate code in a page, like headers and footers) in PHP?)

By the way, perhaps this is a good time to check out my personal site.
 
Last edited:

MKGirlism

3DS and Wii U Game Developer
414
Posts
11
Years
Paths being at /home/username/public_html has nothing to do with Shared Hosting or not, it's because your Hosting uses Linux.
The /home folder is equal to C:\Users on Windows Vista and newer.

To get the Include Paths, you'll use something like (yes, with a forward-slash, if you want to use a backslash, make sure you use it twice every time):
Code:
include("C:/Users/twigzone/blablabla/myfile.php");
Instead of:
Code:
include("/home/twigzone/public_html/myfile.php");

However, it can be much more efficient.
Let's assume the file you're editing right now is "index.php", and you want to include the file "myinclude.php" in the folder called "twiggy".
In that case, it's best to use:
Code:
include("twiggy/myinclude.php");
When using that, rather than using the full path, it'll save you from a lot of typing, and at the same time, it'll work on both, your Linux Hosting, and your Windows PC.
 
900
Posts
13
Years
  • Age 51
  • Seen Jul 22, 2016
I've had the same website now for the past few years and I think it's time to update it, specifically to make it more compatible with tablets.

Here is my site as it currently is: www.jasonfinigan.net

I am not interested in using Wordpress ... at all.

Paramaters:
  • Rotating banner upon page load
  • One column layout
  • Must be easily viewable on both a computer and a tablet

Any suggestions?
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
Paths being at /home/username/public_html has nothing to do with Shared Hosting or not, it's because your Hosting uses Linux.
The /home folder is equal to C:\Users on Windows Vista and newer.

To get the Include Paths, you'll use something like (yes, with a forward-slash, if you want to use a backslash, make sure you use it twice every time):
Code:
include("C:/Users/twigzone/blablabla/myfile.php");
Instead of:
Code:
include("/home/twigzone/public_html/myfile.php");

However, it can be much more efficient.
Let's assume the file you're editing right now is "index.php", and you want to include the file "myinclude.php" in the folder called "twiggy".
In that case, it's best to use:
Code:
include("twiggy/myinclude.php");
When using that, rather than using the full path, it'll save you from a lot of typing, and at the same time, it'll work on both, your Linux Hosting, and your Windows PC.

OK, let's see...

I'm going to use something like include("twigzone/myinclude.php"), right? There's a bit of a problem, though - on the IIS Express 8 server on the local machine, the site root is... / as far as the local server and PHP is concerned, even though the actual files are actually in, say, "C:\Users\Twiggy\Documents\My Web Sites\TwigZone\".

Looks like I'll have to take advantage of remote editing controls in WebMatrix while we figure out the solution of this.
 

MKGirlism

3DS and Wii U Game Developer
414
Posts
11
Years
No, it really doesn't matter.
If you don't start the Path with a slash, it'll recognise the path as a your current folder.

Since, let's say, "index.php" is in "C:\Users\Twiggy\Documents\My Web Sites\TwigZone\", all you need to is "include("myinclude.php");", if "myinclude.php" is in the same folder.
If not, just add the folder name + slash + myinclude.php.

In my own CWMSv5 system, I'm using stuff like:
Code:
include("module/sitemap.php");
include("module/foot.php");
And I can use it on Windows and Linux with no problems.

I've had the same website now for the past few years and I think it's time to update it, specifically to make it more compatible with tablets.

Here is my site as it currently is: www.jasonfinigan.net

I am not interested in using Wordpress ... at all.

Paramaters:
  • Rotating banner upon page load
  • One column layout
  • Must be easily viewable on both a computer and a tablet

Any suggestions?

In my opinion, the third point already fits your wishes.
I agree WordPress can be to limited at times (that's why I've made my own CMS), but all you listed in the Parameters, can be done with WordPress too.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
No, it really doesn't matter.
If you don't start the Path with a slash, it'll recognise the path as a your current folder.

Since, let's say, "index.php" is in "C:\Users\Twiggy\Documents\My Web Sites\TwigZone\", all you need to is "include("myinclude.php");", if "myinclude.php" is in the same folder.
If not, just add the folder name + slash + myinclude.php.

In my own CWMSv5 system, I'm using stuff like:
Code:
include("module/sitemap.php");
include("module/foot.php");
And I can use it on Windows and Linux with no problems.

Looks like it worked like a charm. (Man, why did I not think about it earlier? xD)
 

perthskies

Nostalgic
339
Posts
20
Years
Hello everyone, just wondering if I could get your opinion on my Digimon Frontier fansite:
http://tdfn.ancommunity.net/

I know this is a Pokémon community but a Pokémon fansite is coming soon! xD I've had this fansite since 2003 and it was looking dated with the old PHP includes so I gave it a WordPress makeover.

Would be keen to get feedback specifically on:
  • Loading times (it is fairly graphic intensive and the theme I purchased seems to have AJAX loading)
  • Legibility (background images in place)

Any feedback would greatly be appreciated!
 
Last edited:
900
Posts
13
Years
  • Age 51
  • Seen Jul 22, 2016
In my opinion, the third point already fits your wishes.
I agree WordPress can be to limited at times (that's why I've made my own CMS), but all you listed in the Parameters, can be done with WordPress too.

Does the lytebox work alright with tablets? I know some of them have had issues with javascript coding (especially with drop down menus).

Also, with regards to Wordpress, my main complaint with it is that the more applications you add to the thing, the slower and more cumbersome it becomes. I've seen some Wordpress sites where I could actually go grab a cup of hot chocolate before the site even loads!

But mainly, I'm asking for ideas to change the website because I think it's time to change the look. Having the same website for too long can become boring to people. The problem is, most of the templates I've seen so far don't really appeal to me.
 

perthskies

Nostalgic
339
Posts
20
Years
But mainly, I'm asking for ideas to change the website because I think it's time to change the look. Having the same website for too long can become boring to people. The problem is, most of the templates I've seen so far don't really appeal to me.

Hello Jay,

I looked at your site and I thought it was a nice clean layout. :) If you're thinking of a fresh look perhaps you could consider incorporating your high resolution wallpapers (Destiny's Edge & The Enemy Within) as part of the layout as a background image?

Something along the lines of this as an example: (though text legibility would take a hit)
http://www.agdinteractive.com/games/kq2/about/about.html

Or maybe some background textures like this:
http://www.agdinteractive.com/games/kq3/behindscenes/selwood.html

Bear in mind I'm more biased towards graphic heavy layouts/looks which may not appeal to you.. maybe the others would have ideas if you prefer a more clean/crisp layout?
 
Status
Not open for further replies.
Back
Top