CuteNews

Welcome Guest ( Log In | Register )

Profile
Personal Photo
Rating
 
Options
Options
Personal Statement
StealthEye doesn't have a personal statement currently.
Personal Info
StealthEye
Cute Hack Master
23 years old
Gender Not Set
The Netherlands
Born July-20-1989
Interests
Computers: Programming, Webbuilding
Statistics
Joined: 2-July 04
Profile Views: 8,099*
Last Seen: 16th February 2012 - 07:52 PM
Local Time: May 21 2013, 08:15 PM
1,739 posts (1 per day)
Contact Information
AIM stealteye
Yahoo stealteye
ICQ 86412520
MSN seye xs4all nl (place @ and .)
* Profile views updated each hour

StealthEye

Support

***


Topics
Posts
Comments
Friends
My Content
26 Jul 2004
Isn't all that hard. Just add the following line in your templates:
CODE
<div style="float: left;">{avatar}</div>
Obviously, you may want to replace "left" with "right".

This will give you
QUOTE
/////////////1ste line of text
//image //2nd line of text
/////////////3th line of text
/////////////4th line of text
conituation of text right under the image


You can't have it centered if you're trying to do that.

EDIT: man_of_the_oak pointed out, that floating divs, float over different elements. Meaning it may cause a second post show NEXT to the avatar if the story isn't long enough. A proposed fix to man_of_the_oak which he shared is
QUOTE
You simply need to add overflow: hidden to parent's style.


EDIT2: an example of the above proposed fix is
QUOTE
<div style="clear:both;"><div style="float: left;">{avatar}</div>{short-story}</div>

clear:both will make sure that you don't have stories started next to an avatar if the heigth of the short story is shorter than the avatar height.
23 Jul 2004
CuteNews Include Code Parameters
Not all of them are listed in the readme.htm file or the internal help section. Here is a complete list, with the default behavior (when the parameter is not set):

$category = 'X';
Use this to only show news from a specific category. The "X" stands for the category id (the number of the category). You may add multiple, in the following format:
$category = '1,3,5';
By default, CuteNews will show all news items, regardless of categories.

$template = 'X';
This parameter is used to display your news with a specific template. You can edit/add templates in the "Edit Templates" section of the CuteNews options panel. The "X" stands for the template name, which is case-sensitive!
By default, it will show the news using the "Default" template, which cannot be deleted.

$number = X;
The number of news to display. The "X" should obviously be replaced with the desired number. CuteNews will automatically use news from (multiple) archives, if the active news count is below the $number parameter. While it's great that it will use archived news, this also creates a problem when having more then 1 CuteNews include code (see next post)
By default, CuteNews will show all of the active news, but will not show any news from the archives.
This parameter will also create the pagination (<<prev 1 2 3 next>>) given there's pagination code for it in the templates.

$start_from = X;
Start displaying the news from a given number of news items. You should always set the $number parameter for this to work. Replacing X with 5 and setting $number to 5 for example, will show the news items 6 to 10. The previous/next buttons will not work when using this parameter.
By default, it will show the news from the beginning, and it will change the start from variable when you click the previous/next links in the pagination.

$reverse = true;
Obviously, this will reverse the news. Nothing to configure here.
Default: not reversed.
Since some CuteNews version, it's also a setting under System Configurations in your CuteNews panel.

$static = true;
This will not(!) show the full story and comment pages. This is useful for headlines, when you do want to show the full story in another include on the same page, but do want to show the active news in the headlines include.
Default: not static, so it will show the full story and comment pages.

$PHP_SELF = 'X.php';
Use this to point all of the CuteNews links to another page (such as Full Story and Comment links). This is useful if you want to show the full story on another page. In the page to which $PHP_SELF is pointing, you should add a CuteNews include code where you want to show the news. You should not add a ?var=value etc to the end of the link, use $QUERY_STRING to do that. Note that the previous/next buttons will also point to the new page.
The default page is the page where you added the news to.
Example
CODE
<php
$PHP_SELF = "target.php"
include('show_news.php');
?>

Inside target.php you must have an include to show_news.php as well. But beware of categories. An article in category 1 will not show if the target.php contains $category=2;

$QUERY_STRING = 'X';
When you want to point the news to another page, but when the page uses a link like page.php?var1=value1&var2=value2, you would set $PHP_SELF to "page.php" and you would replace the X (in $QUERY_STRING) with "var1=value1&var2=value2".
Default: The variables are passed to the current page, but with the CuteNews variables stripped off, so when the current page is: "www.site.com/cutenews/show_news.php?subaction=showcomments&id=1090228158&archive=&start_from=&ucat=&myvar=value", the $QUERY_STRING parameter would be set to "myvar=value" (subaction, id,archive,start_from and ucat are CuteNews variables and automatically passed on).

$only_active = true; (added 25/08/04)
If $number was set higher than the amount of active news, and this option is set, CuteNews will not "fill" the missing entries with items from the archives.
Default: Not set, CuteNews will try to add archived news items after the active news items if there are fewer active news items than $number.
15 Jul 2004
Use $PHP_SELF to do that, and use this syntax:
$PHP_SELF = 'target_page.php';
include('show_news.php');

Note that the target page must have a CN include itself, to show the news item.
A normal include (with or without $PHP_SELF) would work.
And be adviced that you can't have a article from category 1 link to target_page.php and have the parameter $category=2; on target_page.php
as target_page.php would show nothing then.

[EDIT]
As some ppl have said they didn't understand this, I will point you to the following url:
Parameters you can use with your CN include
It has a list with all parameters you may use in your CN include code, so also $PHP_SELF is there. smile.gif It should be documented a little better than this one.
7 Jul 2004
  1. Or you use the id parameter for your sites navigation. In that case
    Easy fix: replace the $id variables in your page with $page, and change your links from ?id=... to ?page=... smile.gif
  2. Another thing that might be causing this: Another script is useing the $id variable. Especially polls oftenly use $id. The easiest solution is to switch to another script.

    A solution that might work
    CODE
    if( isset($_GET['subaction'] ) )
    $id= $_GET['id'];
    include(show_news.php);


    A little harder is to replace $id in all files of the script. You may replace all occurences of $id with $fixed_id or something. be sure to change all occurences of
    ['id']
    and
    ["id"]
    to
    ['fixed_id']
    ["fixed_id"]
    Note that you should ony do this for one script.
    If you still get the error, post it at the forums, be sure that you include the actual number and your site in the post.


3 Jul 2004
How do I get the Cutenews files on my server?
Use a FTP client like Filezilla, SmartFTP or FireFTP. You’ll need the following information:
your username, password and ftp address.
If you’re not sure that you have all the information, needed, ask your host about it.
Once you have a FTP connection to your host's server you can start with the uploading.
The installation of CuteNews is really easy and you should do it without any problems if you
follow these steps:
  1. Create a directory on your server ( e.g. cutenews )
  2. Upload the content of the cutenews.1.x.x.zip to the directory you created in step 1
  3. Now you must CHMOD (or CHMOD) the data directory and all files and folders under the data/ directory to 777 (see below for more details). This is necessary to write and edit the news and other data to the database files, and allows you to upload images to the upimages folder.
    Note that some servers (Windows types) don’t have the CHMOD options and don’t always need changing. Chmodding is usually done by selecting the file you want to CHMOD, right click and choose for the option properties or permissions. Though more detailed information we cannot provide as the procedure differs from FTP client to FTP client. If you have Windows hosting, you should ask your host on how to change permissions, as the tool to do this differs from host to host, too.
  4. Finally, go to www.yoursite.com/cutenews/index.php with you favorite browser and follow the instructions.


If you don't know if you have Windows hosting, don't ask your host. Try the normal chmodding first (it'll be quicker than waiting for an answer from your host)
If you get a "500 command not understood" you have Windows hosting.
Last Visitors


17 Apr 2013 - 0:07


25 Mar 2013 - 13:24


25 Jan 2013 - 11:27
Guest


7 Aug 2012 - 8:59


1 Apr 2012 - 19:35

Comments
Millar
Great contributions to the forum you have.
30 Apr 2010 - 22:29

Friends
There are no friends to display.
RSS Lo-Fi Version Time is now: 21st May 2013 - 07:15 PM