1
toddarc
Re: Pay Pal - Part II
  • 2004/9/17 15:12

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Has there been any progress on a paypal subscription module? If anyone is getting close please post - I'm hoping I can avoid a "hack" job, but really feel the need to button up this project:)

If I end up hacking, I'll share when I'm done for those of you still looking for a solution that at least performs minimal DB updates.

Thanks!

Todd



2
toddarc
Re: Can I query for notifications as well?
  • 2004/8/22 7:14

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Thanks for setting me straight on that:)

Since I'm showing my unknowledgable side anyway...

I guess I don't quite see how the average registered user uses this feature - which I guess is why I was wanting to hide it unless they actually had a new notification. Is it a critical link to keep available to them?

Thank you much for your time!

Todd

************ OOOHHHHHH... ********

Guess is in the eye of the beholder - I can see its function on this site. It would be of more use to admin users, but could reduce angry admin emails when users get carried away with notification check boxes:)



3
toddarc
Can I query for notifications as well?
  • 2004/8/22 6:50

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Hi Folks,

I'm replacing my usermenu with one of my tinycontent menus. I'm using this code for inboxes, and am wondering if I can display the notification link only if there are new notifications as well.

<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>

**** Code from menu block ***
<{if $msgcount > 0}>
<a class="menuSub" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><{$msgcount}></span>)</a>
<{/if}>
**** End ****

What I would like is a conditional link like this for notifications. Anybody have a snippet laying around for this?

Thanks for your time!

Todd



4
toddarc
Re: Is there a place I can add conditional coding for the start module?
  • 2004/8/21 1:41

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Feel kinda foolish now, should have expected this...

I got the following code to work:

//show proper homepage module for this users group level
global $xoopsUser;
if(!empty($xoopsUser)) {
$group = $xoopsUser->getGroups();}
if ((in_array(1, $group)) OR (in_array(2, $group))) {//user is registered so show member homepage
header('Location: '.XOOPS_URL.'/modules/tinycontent2/');
exit();
}
else {//user is unregistered so show public homepage
header('Location: '.XOOPS_URL.'/modules/tinycontent/');
exit();
}

Now the problem is this - if the visitor logs in or out while on the homepage, the application instinctively returns him to the same page after logging (but of course now it is the wrong module for his group).

Any ideas on modifying the redirect mechanism? Or would it make more sense to undo these mods and set the default module to a one-page module with the above code?

Thanks

Todd



5
toddarc
Re: Is there a place I can add conditional coding for the start module?
  • 2004/8/20 16:19

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


It wouldn't be as simple as commenting this out (in index.php):

//check if start page is defined
if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');
exit();
}

and adding this:

if ($xoops_isuser)
{header('Location: '.XOOPS_URL.'/modules/tinycontent/');
exit();
}

else
{header('Location: '.XOOPS_URL.'/modules/tinycontent2/');
exit();
}

would it?

*********Added**********

After some experimenting with the above code, I can alter the module but can't get the "if" statement to act conditionally (or maybe I'm using the wrong variable for a logged-in person). If one of you php'ers could help a bit i'd sure appreciate it!

Todd



6
toddarc
Is there a place I can add conditional coding for the start module?
  • 2004/8/20 15:44

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Hi folks,

I was wondering if anyone has added code to aim the homepage at a different module if a user is logged in as a webmaster/registered or anonymous user? Right now I've set up blocks based on group permissions, but the site manager has no clue on html coding so would prefer he had the ability to modify start pages through module resources.

So if the above isn't clear, I would like logged-in users (including webmasters) to see TinyD1 and anonymous users to see TinyD2 as homepage content.

Thanks for your time!

Todd



7
toddarc
Re: news 1.2 help
  • 2004/8/15 4:13

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Oops, was in the wrong template...

Shucks, even after making the "correct" updates, the url is unaffected...

I'm happy with things as they stand though, SEO services weren't included in this project so is "above and beyond" as far as the client is concerned.

Thanks for the offer Tom, it is much appreciated. I have projects with higher priorities, so will change direction at this time. Looking at your post ratings, I'm sure we'll bump into each other down the road - it's been a pleasure!

Todd



8
toddarc
Re: news 1.2 help
  • 2004/8/10 22:17

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Wow, that was quick!

I won't be running the "stock" news module, so hopefully your suggestions will do the trick.

I really appreciate your offer to package this thing for me (3 years on the CF forums never once produced helpful gestures like this), but with upgrades in mind I've been keeping a detailed "hack" log to reference later on down the road. I'll put your suggestions to use later on tonight and will let you know how it works out :)

Thanks again for your time!

Todd

**************** Updated

Have been having persistant file permission problems with my host - one of which prevented me from changing the directory name (for some bazaar reason). Am waiting for the nameserver changes to take effect for my new server space and will attempt this again...

**************** Updated

Changing the directory name causes a few more issues, so will probably dig into it at a later date. The two issues I saw were: image in admin still called from "news" directory - and installer couldn't find the module. Is small potatoes though because the application looks like I intended in almost every other way:)

Here's my hack log in case it helps someone down the road:

Hack Record for Stories Module (converted from news 1.2)

/language/english/admin.php

Changed lines 5,6,15,18,19,20,22,26,70,81,102,103 to refer to "stories" and not "news articles"

/language/english/blocks.php

Changed line 9 to reflect "stories" and not "articles"

/language/english/main.php
Changed lines 15,18 ("the scoop" to "introduction"),24,28,29,35,38,39,50,56 to reflect "stories" and not "news articles"

/language/english/modinfo.php
Changed lines 6,9,12,14,15,16,18,21,26,30,32,33,34,35,36,37,40,50,51,52,54,72,80,85,90,98 to reflect "stories" and not "news articles"


Thank you much!

Todd



9
toddarc
Re: news 1.2 help
  • 2004/8/10 21:54

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


I do have one more question, but is not keyword-friendly for a forum search...

Although not critical, I'm wondering if the directory name for a module can be changed. If I uninstalled this module and renamed the "news" directory to "stories" and reinstalled, would anything "unwanted" happen? I've found directory names are really "cheap" SEO enhancers, so would be nice :)

Thanks Again!

Todd



10
toddarc
Re: news 1.2 help
  • 2004/8/10 3:28

  • toddarc

  • Just popping in

  • Posts: 11

  • Since: 2004/8/8 6


Thank you very much for the help Tom -

Starting point + Dreamweaver should get this task done yet tonight :)

Much appreciated, and have a great evening!

Todd

Worked like a charm - thanks again!




TopTop
(1) 2 »



Login

Who's Online

115 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 115


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits