Dedicated to Ulrich Eckern on the occasion of his 60th birthday.We develop an inhomogeneous mean-field theory for the extended Bose-Hubbard model with a quadratic, confining potential. In the absence of this potential, our mean-field theory yields the phase diagram of the homogeneous extended Bose-Hubbard model. This phase diagram shows a superfluid (SF) phase and lobes of Mott-insulator (MI), density-wave (DW), and supersolid (SS) phases in the plane of the chemical potential μ and on-site repulsion U ; we present phase diagrams for representative values of V , the repulsive energy for bosons on nearest-neighbor sites. We demonstrate that, when the confining potential is present, superfluid and density-wave order parameters are nonuniform; in particular, we obtain, for a few representative values of parameters, spherical shells of SF, MI, DW, and SS phases. We explore the implications of our study for experiments on cold-atom dipolar condensates in optical lattices in a confining potential.Original Paper is different on the two sublattices of the hypercubic lattices we consider, and a super-solid (SS) phase (see, e.g., [15,18,19]).Before we present the details of our study, we summarize our principal results. We first develop a mean-field theory for the homogeneous, extended Bose-Hubbard model by developing on the work of our group on Bose-Hubbard models for the spinless and spin-1 cases [7,12]; this yields the SF, MI, DW, and SS phases and the transitions between them, which have been studied by a Gutzwiller-type approximation [15] that is akin to, but not the same as, our mean-field theory. We then develop an inhomogeneous mean-field theory for the inhomogeneous extended, Bose-Hubbard model by generalizing our inhomogeneous mean-field theory for the Bose-Hubbard model [14]. In particular, when we use a quadratic confining potential in three dimensions (3D), our theory yields inhomogeneous phases with spherical shells of SF, MI, DW, and SS states. The precise way in which these phases alternate depends on the parameters of the model; we study a few illustrative cases explicitly for which we present order-parameter profiles and their Fourier transforms. We also discuss the experimental implications of our work.The remaining part of this paper is organized as follows. In Sect. 2 we introduce the inhomogeneous extended Bose-Hubbard model and then develop an inhomogeneous mean-field theory for it. In Sect. 3 we present the results of our mean-field theory. Section 4 contains concluding remarks; here we give a brief comparison of our work with earlier studies and we explore the experimental implications of our study.