phpNewsManager & phpWebMagazine Quoestions

Gregor / 2 decades ago (01 April 2003 08:43)

If you need help, have any question, bug reports and anything else about phpNewsManager and phpWebMagazine goes here Happy



Post replies:


1 decade ago (01.11.2004 11:05)
Reply by: wary109
*-*
1 decade ago (02.11.2004 01:59)
Reply by: polaris
Antonio,
do you have in your db.inc.php file set this path like this?
$news_path = "/something/here/admin/gfx/news"
$news_url = "[LINK]"

This is where you put path to folder where pictures will be saved. For news you need to put path to /gfx/news/ and for gallery /gfx/gallery.

Regards.
1 decade ago (17.11.2004 11:41)
Reply by: polaris
New bug:
newspix.php file (this file is for adding pictures in your news).
In function EditPicture there is SQL query when you update your picture that looks like this:

mysql_query("UPDATE ".$GLOBALS[´db_news_pics´]." SET picture=´".$HTTP_POST_FILES[´filename´][´name´]."´,thumbnail=´".$HTTP_POST_FILES[´filename´][´name´]."´ WHERE id=´".$_POST[´id´]."´") or die("LINE 262:".mysql_error());

Well, you need to delete this part:
,thumbnail=´".$HTTP_POST_FILES[´filename´][´name´]."

Regards.
1 decade ago (19.11.2004 02:23)
Reply by: omth99
Hi everybody,

I apologise if this issue has been brought up and solved before, but I can´t seem to find it on this board.

My problem is to enable the admin in the newman to select a news item to show in the home page or not, with a click or a dropdown selection where it says breaking - visible - hidden news in the combo box.

In other words; another option to make the news item visible only in the news category selected when the news is added but shows only in the news cat itself not in the home page..

Is this possible? I have tried some of the modules and managed to add a new field in the dB where I can store the value to say don´t show in the home page, but I can´t figure out how to extract this info from dB via newman_lib.php in the newsmagazine folder. It´s using cases and when add or change the existing cases I end-up either no news item showing or no changes in the homepage.

Any input will be apreciated. I have some experience with PHP so don´t be afraid to be technical.

Hopefully your answers will be a wealth of resources for the other users of this fantastic program.

Best wishes
1 decade ago (21.11.2004 08:01)
Reply by: polaris
I believe that it´s possible but you´ll need to change some code. Idea is this: first add option in breaking/visible/hidden news combo box, something like /front page/. So you need to look in code for part where news are added to mysql database. You need to add extra field in database (news table) with option 1 or 0 (show or not show). So when you add new news this field must be updated with 1 or 0.
Then you need to look in code for part where news are selected for front page and put something like this in mysql query: WHERE frontpage = 1.
Also, you need to update all old news which you want to show or not show in front page.
I could look in this but don´t have local installation of newsmanager and don´t want to mess up with one that´s working on site.
1 decade ago (22.11.2004 01:24)
Reply by: omth99
Thanks for the reply Polaris,

I was wondering if you could be more specific about

***mysql query: WHERE frontpage = 1*** .

Any help is highly apreciated here.

Best wishes

1 decade ago (22.11.2004 01:27)
Reply by: omth99
Thanks for the reply Polaris,

I was wondering if you could be more specific about

***mysql query: WHERE frontpage = 1*** .

Any help is highly apreciated here.

Best wishes

1 decade ago (22.11.2004 06:54)
Reply by: polaris
Hm...do you have demo somewhere installed? This fix takes about 10-15 minutes so I could try to put it in your demo.

I´ll try to explain. In newman_lib.php there is function ShowNewsList.
There is query:
$query = "SELECT * FROM ".$GLOBALS[´db_news´];
$query .= " WHERE type=´1´ ";

so here you could put just another WHERE something like this
$query = "SELECT * FROM ".$GLOBALS[´db_news´];
$query .= " WHERE type=´1´ AND frontpage=´1´";

Regards.


1 decade ago (22.11.2004 10:47)
Reply by: polaris
Ok. I´ve managed to make this. I could try to send this modification but you´ll need to make modification to several files. Or I can just send you my modified files (which are modified also on some other levels).
Now I´m working to displayed span pages when you click on category link if there is more that 10 (or some other number) news in that category.
1 decade ago (23.11.2004 01:23)
Reply by: polaris
Span pages are finished. For every category where is more news than you specify, there is listing like Page: Prev 1 2 3 4 Next.
This was made by adding new function in newman_lib.php but also chaning some core code.

Regards.
1 decade ago (28.11.2004 02:42)
Reply by: polaris
If you have problem with crashing IE6 (IE 5+) when you add news, you can find resolution at this address:
[LINK]

Problem is in StoreCaret JavaScript function for storing current cursor position (needed when adding picture/smileys etc in your news).

You can find this function at newsman.js file.

Regards.
1 decade ago (01.12.2004 02:25)
Reply by: omth99
Hi Polaris,

Is it possible to email or post or upload those new modified files? or just the chaged codes and functions?

Best wishes,
1 decade ago (06.12.2004 12:25)
Reply by: polaris
It is possible but problem is that I´ve changed this script a lot. I´ve add some new features (like comments for polls, span pages for news) which some of them require updating your database and several files.
By reading this topic you should find all fixes that I´ve made (if not all then most of then) and if you require some specific file, I could send it to you.
1 decade ago (06.09.2005 06:52)
Reply by: dellsworth
what do I change to remove ´ showing up instead of apostrophes in picture captions?
1 decade ago (06.09.2005 06:55)
Reply by: dellsworth
okay that should say acute with an ampersand in front of it in the last post.