an idea : lobby integrated news database - Page 6

an idea : lobby integrated news database

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

Ok so I looked for a long time, tried a lot of different things and in the end... automatic truncation isn't going to happen, but I can enforce the use of the <!--more--> tag fairly easily, so while it's not really an issue except for tasclient, it is an issue that will take care of itself.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: an idea : lobby integrated news database

Post by AF »

Forboding Angel wrote:Ok so I looked for a long time, tried a lot of different things and in the end... automatic truncation isn't going to happen, but I can enforce the use of the <!--more--> tag fairly easily, so while it's not really an issue except for tasclient, it is an issue that will take care of itself.
http://snipplr.com/view/8209/truncate-a-wordpress-post/
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

Have you tried using that AF? It strips some of the formatting, and simply truncates the post without providing a link to single.php for viewing the entire post.

It is useful, but at the same time it does the exact same thing that the vast majority of plugins do. In fact, tbh a lot of the plugins break the page outright if you don't strip the formatting, which leaves you with a barely readable, jumbled mess.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: an idea : lobby integrated news database

Post by AF »

Its php code not binary, aka it can be edited!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

Feel free, did I mention that it breaks the css?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: an idea : lobby integrated news database

Post by AF »

AF wrote:Its php code not binary, aka it can be edited!
did I mention it can be modified? Youll find allsorts on the web but if your looking for something that does exactly what you want with no modification then you might well be searching all day for some things.

You have 3 options how I see it, all of which are trivial.
  • When the maximum number of characters is reached in the above code, search for the next </p> and truncate form there on.
  • Instead of using get_the_content() in the function in that snippet use the following function:

    Code: Select all

    function get_the_content_with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    	$content = get_the_content($more_link_text, $stripteaser, $more_file);
    	$content = apply_filters('the_content', $content);
    	$content = str_replace(']]>', ']]>', $content);
    	return $content;
    }
    
    Thus restoring the <p> tags etc
  • Give the containing div a maximum size and insert a second div inside with position:absolute; and bottom:0px; ( I think its absolute hmmm ) and give it a background iamge which is a gradient the same as the post background but transparent. Then on the parent div give overflow:hidden; and itll look like the content fades out and is truncated.
I'm trying to help, but I'm not writing your site for you and telling me to edit it myself and hand it to you on a silver platter is plain rude.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

imbaczek wrote:re satirik, i was bugging him about this the other day, and he said he's still not happy with how the site looks, something about removing [more] tags and whatnot.
Satirik, can you explain what you meant by this?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: an idea : lobby integrated news database

Post by manolo_ »

its good that its include now, but immo it looks like a cheap adv. banner, could i disable it? btw it shouldnt show links i already visited
User avatar
Wisse
Posts: 263
Joined: 10 Jul 2006, 17:50

Re: an idea : lobby integrated news database

Post by Wisse »

manolo_ wrote:...immo it looks like a cheap adv. banner...
I completely agree with this. It looks like free program that let's you get rid of banners for $15.
I would like to disable it also. I like how it opens page and everything but that bar is just awful.

It would be much nicer if you displayed "Highlight Reel" items from spring.info page in 1 line and only in #main. It would look cool with already included picture and formatting.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: an idea : lobby integrated news database

Post by imbaczek »

I'd like a 'simple look' option, ie. small, blue links on gray background.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: an idea : lobby integrated news database

Post by Satirik »

the scrolling news is html ... you can edit the templates and with scripts you can change the layout
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: an idea : lobby integrated news database

Post by imbaczek »

ok. how about allowing different htmls in the options so i could easily switch/install new layout as plugin?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: an idea : lobby integrated news database

Post by Satirik »

i can add a python function to refresh the scrolling news ... then you'll just have to replace the template files
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: an idea : lobby integrated news database

Post by imbaczek »

here's my simplified layout:
Image
Attachments
baczek_template.txt
rename to .html
(2.77 KiB) Downloaded 73 times
mynewsbar.png
(11.23 KiB) Downloaded 386 times
User avatar
Wisse
Posts: 263
Joined: 10 Jul 2006, 17:50

Re: an idea : lobby integrated news database

Post by Wisse »

Can I completely disable it?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

Just wanted to say that you've done a really nice job satirik, and Thank you.

@baczek, thanks. That is kinda more my style

umm I could give you the css and stuff that make up the little newsreel items. I think duplicating the look as a template it would be pretty easy. You prolly wouldn't be able to keep the thumbnails (I could be lying), but on the other hand I'm not sure not having the little thumbs would necessarily be a bad thing.

Edit: Come to think of it... those thumbnails are all uploaded to an accessable dir, so actually assuming there was a way to know which one each post pointed to, it would be pretty easy.

Gimmie a lil bit, I'll fiddle with the code and see what I can come up with.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: an idea : lobby integrated news database

Post by Satirik »

don't forget to add "New map : " before map name when posting a news about a map ... because nobody will understand what "Mearth V4" is
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: an idea : lobby integrated news database

Post by Satirik »

imbaczek wrote:here's my simplified layout:
Image
looks like google ads ... nobody click on ads
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: an idea : lobby integrated news database

Post by Forboding Angel »

Satirik wrote:don't forget to add "New map : " before map name when posting a news about a map ... because nobody will understand what "Mearth V4" is
Yar you're right about that. I noticed but I also didn't wanna take up too much space in the title, but yeah that would be fine. That's what I get for overthinking it lol
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: an idea : lobby integrated news database

Post by Argh »

Saw how it's working in the Lobby. This is brilliant, guys! Great work!
Post Reply

Return to “Engine”