[top] [bottom]
You are now browsing the old version of Chlomo, an archive of the old site. Click here when you want to go the new version.
[ chloe ] [ photoshoots / photo sets / movies ] [ offtopic ] [ site ]

/site/ - feedback and suggestions

Welcome to chlomo.org, the best Chloe Grace Moretz fan site™. We have all the Chloe news, pictures,
photoshoots, videos, fan art, original content, GIFs and discussions you could ever want.
If you're new, read this or give your honest thoughts on this place
posting Chloe fakes, disrespectful comments about her or her family will get you banned
if you want the latest Chloe updates (news, photoshoots and so on) you can find them here
report bugs, posting problems or feature requests here or contact support@chlomo.org
back to index

If you are new here DO NOT make a new thread (read why)
max. 10Mb / 10000px
Password (For file deletion.)
01download the chlomo pack02see the image gallery03join #chloe4starwars04are you new here?

File: 1365021157302_consider-the-following.jpg (78.17 KB, 528x479)

 Anyone here knows PHP? !a3dKSVA5Rc 3806Locked

This is probably a long shot but it's worth a try:

Does anyone here know any PHP?

There's one last thing I need for the site and it's outside my area of expertise so I'm hoping there's someone here (probably a lurker) who knows PHP and is willing to give a hand in making this place better.

Basically what I want is to have individual page titles for each thread (as opposed to now when they all have the board title ("/chloe/ - all things Chloë related"). So, if a thread is called "Chloë thread #432" then the page title should be the same.

There are two ways I see this done

1) use the OP's title as the page title - that is the logical and elegant solution
2) use a sort of hack and have a separate php file with the list of all the titles added by hand (so for example you say that for the thread /chloe/216216 the title should be "Chloë Thread #428")

Obviously, whoever decides to help us with this will have to familiarize himself with Tinyboard, but that's a very lightweight and clean platform so I don't think it will be a problem.

If the fix for this is simple then I'm hoping our gratitude will sufffice, and maybe we can add his name in the footer (thanks to "xxxxx" for his help).

If the solution takes more time then I will pay for it.

I know this approach might seem a little fucked up but
a) I tried going to the tinyboard developer which is pretty much MIA and has been so for months
b) I don't want to go to some freelancer site as I'd rather ask the support of another fan who hopefully has the skills to help

 1337B345T3R (8ee0) 3807

Easy bro. Just make a smarty call to the specific location for the desired title for the threads. Then make that same call echo out in the the HTML title.

Basically <?PHP $yoursmarty ?> For the title.

I would do it for you but I'm on vacation on my phone. If you need more help just google Smarty PHP.

 GG!a3dKSVA5Rc 3808

File: 1365049067604.jpg (193.78 KB, 1280x720)

Yeah. I'm not getting it. The calls themselves would not be the problem anyway but the page ID would be. How can I make the call go "Hey, I'm the page X, give me the title associated with it"

Btw you're the guy who said he eats PHP for breakfast, said he's willing to help (if needed) and then completely went MIA, right?


Can't you just use JavaScript for that?
It should be something like:
<code>document.title = document.getElementsByClassName('subject')[1].textContent</code>


Also sorry about the TinyBoard developer; he's been having some life issues and neglecting TinyBoard.
He's a nice guy, I regularly talk to him.

 GG!PT7cKdNGCY 3855

Nope, crawlers ignore the JS

I'm sorry to hear that. He's been very supportive and seems like a nice guy but like

Well this was a long shot anyway but the new page title is good enough for now (even if it's static)

 Joseph!!DuWLmNZGuQ 3857

What exactly do you mean by "the crawlers ignore it"?
It should work fine if you want regular people to see the fixed page title, but maybe if you can try explaining it better, I can help.

 Joseph!!DuWLmNZGuQ 3858

Also, you can contact me by IRC.
Or use the webirc at http://webirc.datnode.net/ with #care as channel.
If you're lucky, you might see TinyBoard's admin there as well as he co-owns the network.

 GG!PT7cKdNGCY 3859

I mainly want it for SEO, not regular people

 Joseph!!DuWLmNZGuQ 3860

Ah, that makes sense.
But it wouldn't be a bad idea to have it for the users.

 GG!PT7cKdNGCY 3861

The users barely leave the numbered thread so I'm not too worried for them
I'm more interested in SEO
I want people who google "Chloë moretz wallpapers" to get to our thread, for example

 Joseph!!DuWLmNZGuQ 3862

I see, yes that makes perfect sense.
Also savetheinternet (creator of TinyBoard) was just there in irc, but I don't think he'd respond by email because he just arrived at vegas.

 Mastër Bëan!QMOd.BeanU 3863

File: 1368063040555_131292063887.png (198.15 KB, 330x637)

Plebby #thread camper here. What's an SEO?

 Anonymous (762d) 3864

i might try to get in touch with him on irc
i wanted to propose him an exchange: I'll redesign his tinynoard.org site if he does the title change like i want it

 Anonymous (762d) 3865

search engine optimization

 Joseph!!DuWLmNZGuQ 3866

Pretty sure he isn't interested in that

 Anonymous (762d) 3867

Fair enough.
what about a new tinyboard skin? Something cool that looks like it came out in 2013, not that fuchaba and yotsuba crap?

 Joseph!!DuWLmNZGuQ 3868

Makes people feel at home.

 GG!PT7cKdNGCY 3870

if you lived all your life in a cardboard box, moving in a luxury apartment might not feel like home, but it will feel better if you give it time

just because some people are accustomed to some things doesn't mean they're not shit, and those skins are shit
we had our fair share of people here who cried and moaned when we removed the 4chan skins here, but that stopped in time because it was a change for the much, much better in pretty much every conceivable way

 Anonymous (22ec) 4109

I've been trying to get it to spit out the thread subject in the title, but (thus far) haven't been able to pinpoint where exactly to place a function to str_replace a preset title with one being grabbed from the database.

 GG!Mu5DJ1d1S. 4110

I wish you the very best then. This would be a great feature to have

 Anonymous (22ec) 4112

Well, the thing is - you can do this. It won't validate, but forcing the title attribute away when in thread mode, and then placing it in the part of the template that shows the subject, it will show up as the appropriate title, although it won't validate properly.

 GG!Mu5DJ1d1S. 4229

> although it won't validate properly.
What do you mean?

 idle (22ec) 4230

W3 validator - since the title attribute won't be in the header, it won't validate as being 'proper' - it will work, though.

So, say you've got thread.html and index.html (your templates for thread and board). In thread.html, you delete the entirity of the title /title tag.

Then, in post_thread.html, you find where it's spitting out your subject (I set up a {% block threadSubject%} in my template for this, which you can see here (https://gist.github.com/idlechan/5995381)

However, W3 validator will give you the following errors:

'Element head is missing a required instance of child element title' and 'Element title not allowed as child of element span in this context. (Suppressing further errors from this subtree.)'

 GG!Mu5DJ1d1S. 4231

I will give this a proper test later this weekend ( I have a separate tinyboard install I can test it on) but for now I;m not sure I fully get what you're saying.

Let's take this board and this thread for example. What will the title tag be for this thread and for its index page ( >>>/site/ )?

 idle (22ec) 4232

Block of code to add to post_thread.html (https://gist.github.com/idlechan/6002868).

(Replace {% if post.subject|length > 0 %} {# show subject #} {{ post.subject }} {% endif %} with the block in the gist).

Open thread.html, get rid of the title tag in the header.

The title will now read (for this thread, as an example): "Anyone here knows PHP? / The best Chloe Moretz fansite"

Alter to suit your needs.

 idle (22ec) 4233

>> for its index page?
index.html and thread.html are two separate templates. index.html is the template used for board index pages, while thread.html is used for threads. So whatever you change in thread.html will not affect an index view because that template is controlled by a separate file.

 GG!Mu5DJ1d1S. 4234

File: 1373918528074_132706371467.gif (1.2 MB, 280x221)

That sounds perfect. I'll give it a try this week. Thanks a lot

 idle (22ec) 4235

{% if board.name == "boardname" %} do something {% endif %}

(The templating Twig - if you want custom descriptions based on boards, look up Twig statements, and write different blocks to be shown on different boards based on this condition.

Twig =/= PHP, btw.

 idle (22ec) 4236

STI built it into Tinyboard now, along with a few other (recent) changes. (https://github.com/savetheinternet/Tinyboard/issues/122)

 GG!Mu5DJ1d1S. 4237

thanks for the update
I checked back on git about a week or so ago and it hadn't been updated in ages
glad to see he's still working on it
and now tinyboard is at dev-8
got to see what else was changed

 idle (22ec) 4239

And now that thread specs are available outside of the 'loop', you can set up things like meta thumbnails (or other meta tags that are thread based, based on information that can now be grabbed from the thread.)

Going to try to find the php excerpt function I used to have to output the excerpt of the post (if a post body exists) for the meta description of thread pages.

 idle (22ec) 4240

Sorry if this is just coming off as spam at this point, but: Twig has a built in trim function (in the newer release), however, I can't even find what version is being used NOW. Simply dragging and dropping the new files into the Twig folder on the installation destroys it, so it'd be a matter of downloading the new files, and then going through both, by hand, and altering what needs to be altered so that Tinyboard works wit the new version of Twig - which I'm not sure I'm exactly thrilled about (or up to the challenge, quite frankly).

 idle (22ec) 4241


It will look to see if there is thread content (and it's not just an image with no text content) and then strip it down to the preset amount of words to return for the description.

Regexp to strip out everything but alphanumeric/punctuation and spacing (soyoudontwindupwiththis) or a " (which will break the meta tag).

Should also be resistant to any injection exploits as only alphanumeric/punctuation are returned and no tags of any kind (if present (html,php,etc) will be returned.

 GG!Mu5DJ1d1S. 4246

I'll loo into that but I think proper thread titles is exactly what I needed and more than meets my needs

 GG!Mu5DJ1d1S. 4247

since you seem to know tinyboard so well
any idea how the quote-selection.js works?

 idle (22ec) 4249

Load quote-selection.js
Highlight what you want to quote
Start typing


i know php basics

 GG!Mu5DJ1d1S. 4558

thanks but that's old
we got our problems sorted out in the mean time

Delete Post []
This site is for a more mature audience
That doesn’t mean you have to be over 18 to post here, it just means that some of the jokes and language here might not be suitable to a more prude or young crowd.
back to index
[ chloe ] [ photoshoots / photo sets / movies ] [ offtopic ] [ site ]